- 2
How to solve “repeat and learn code! code! code!” code coach in 18.1 for loops javascript
Can’t solve the “repeat and learn code! code! code!” code coach in 18.1 lesson for loops. Plz help
5 Respostas
+ 3
Mark | Aspiring Blockchain Developer
Lesson 18.1 of the Javascript tutorial is all about for loops.
Check out the 2nd section of those lessons, the answer is there!
for(int i=0; i<?; i++){
something must happen here;
}
+ 1
Please post:
-Example inputs and outputs, plus the task
-your attempt, so we can point you in the right direction instead of giving you an answer key :)
+ 1
"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!
var expression = readLine();
//your code goes here
for (expression === expression; expression === expression; expression++) {
console.log(expression * 3);
}
I am lost honestly
+ 1
Well.. your code right now, given the input "learning is fun" would output "learning is funlearning is funlearning is fun".. on one line. The \n character can be added to add a new line