0

JavaScript pls help I’m stuck

Repetition is the mother of learning, the father of action, which makes it the architect of accomplishment." - Zig Ziglar. Inspired by these words, let's create a little program that will output an expression which is given as input, 3 times. Task Complete the code to output the given expression 3 times. Sample Input Learning is fun! Sample Output Learning is fun! Learning is fun! Learning is fun!

17th Sep 2022, 10:56 AM
Olajorin Esther
Olajorin Esther - avatar
5 ответов
0
Hi! what are your thoughts on this?
17th Sep 2022, 11:31 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
input = prompt("Hey") for (let i = 0; i < 3; i++){ console.log(input) }
17th Sep 2022, 1:07 PM
Oriol
0
console.log( (`${input}\n`).repeat(3) ); https://www.sololearn.com/compiler-playground/WhBrtXxlDlF2
17th Sep 2022, 1:17 PM
SoloProg
SoloProg - avatar
0
for (let i=1;i<=3;i++){ console.log(expression); } /*or for (let i=0;i<=2;i++){ console.log(expression); }*/
17th Sep 2022, 5:18 PM
Steve Nova
Steve Nova - avatar
0
Its not working
20th Sep 2022, 5:53 PM
Olajorin Esther
Olajorin Esther - avatar