0

Hello world display 100 times using function with java script

Java script

30th Jun 2022, 2:18 PM
abi abitha
abi abitha - avatar
17 odpowiedzi
+ 4
You would need a loop that iterates to 100 and each time it prints your statement. If you write a code and it doesn't work, please share it and someone can better help you.
30th Jun 2022, 4:25 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
console.log( "Hello world\n".repeat(100) ); // Or document.write( "Hello world<br>".repeat(100) ); // Or for (let x=0; x<100; x++) console.log(`Hello world ${x+1}`);
30th Jun 2022, 5:16 PM
SoloProg
SoloProg - avatar
+ 1
function NumberofPrint(num) { var i; for(i=1;i<=num;i++) { console.log(i+" Hello World"); } } NumberofPrint (100);
1st Jul 2022, 3:08 PM
Hussain Mehdi Birmani
Hussain Mehdi Birmani - avatar
+ 1
console.log() is a function to print something on the console window or Browser.
1st Jul 2022, 3:20 PM
Hussain Mehdi Birmani
Hussain Mehdi Birmani - avatar
+ 1
abi abitha hope this help function hello_world( ) { for(var i = 1; i <=100 ; i+=1) document.write("Hello world \n") ; } function printing ( ) { return hello_world( ) ; }
2nd Jul 2022, 4:00 AM
Just Some Random Guy
Just Some Random Guy - avatar
+ 1
Yeah sure, I'm complete my task. Thank you all
2nd Jul 2022, 6:51 AM
abi abitha
abi abitha - avatar
0
What is your question?
30th Jun 2022, 2:20 PM
Justice
Justice - avatar
0
String hello world display 100 times
30th Jun 2022, 2:23 PM
abi abitha
abi abitha - avatar
0
With java script using functions
30th Jun 2022, 2:24 PM
abi abitha
abi abitha - avatar
0
That's not a question, that's a statement.
30th Jun 2022, 2:24 PM
Justice
Justice - avatar
0
O/p Hello world in 100 times
30th Jun 2022, 2:48 PM
abi abitha
abi abitha - avatar
0
Thank you
1st Jul 2022, 3:18 PM
abi abitha
abi abitha - avatar
0
Please explain what is console. Log
1st Jul 2022, 3:19 PM
abi abitha
abi abitha - avatar
0
I'm using { document. Write (str+,'<br>') ; }
1st Jul 2022, 3:21 PM
abi abitha
abi abitha - avatar
0
No problem you can use this too 👍
1st Jul 2022, 3:22 PM
Hussain Mehdi Birmani
Hussain Mehdi Birmani - avatar
0
Mm OK
1st Jul 2022, 3:26 PM
abi abitha
abi abitha - avatar
0
console.log() is a function to print something on the console in a browser
1st Jul 2022, 5:50 PM
leo
leo - avatar