- 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

2nd Oct 2021, 7:39 PM
Mark | Aspiring Blockchain Developer
Mark | Aspiring Blockchain Developer - avatar
5 odpowiedzi
+ 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; }
2nd Oct 2021, 9:00 PM
Rik Wittkopp
Rik Wittkopp - avatar
+ 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 :)
2nd Oct 2021, 7:48 PM
Chloe
Chloe - avatar
+ 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
2nd Oct 2021, 8:00 PM
Mark | Aspiring Blockchain Developer
Mark | Aspiring Blockchain Developer - avatar
2nd Oct 2021, 8:00 PM
Mark | Aspiring Blockchain Developer
Mark | Aspiring Blockchain Developer - avatar
+ 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
2nd Oct 2021, 8:02 PM
Chloe
Chloe - avatar