CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

String Building in a Loop

JavaScript code walkthrough · Question 1
easyLoops

Code

Read carefully. What does this print?
1let result = "";
2for (let i = 1; i <= 3; i++) {
3 result += i + " ";
4}
5console.log(result.trim());

Your answer

Next