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!
5 ответов
0
Hi! what are your thoughts on this?
0
input = prompt("Hey")
for (let i = 0; i < 3; i++){
console.log(input)
}
0
console.log( (`${input}\n`).repeat(3) );
https://www.sololearn.com/compiler-playground/WhBrtXxlDlF2
0
for (let i=1;i<=3;i++){
console.log(expression);
}
/*or
for (let i=0;i<=2;i++){
console.log(expression);
}*/
0
Its not working