0

What is wrong with this code

var expression = readLine(); for(var1=0;1<3; 1++){ console.log(expression ) } //your code goes here

28th May 2022, 7:00 PM
Ifeanyi
Ifeanyi - avatar
2 Answers
+ 2
1) readLine is not a valid function in vanilla javascript. 2) Variable names cannot start with a number (so "var 1" and "1++" will throw an error).
28th May 2022, 7:05 PM
Daniel C
Daniel C - avatar
0
You have to use the same variables throughout the loop var expression = readLine(); for(var1=0; var1 < 3; var1++){ console.log(expression ) } //your code goes here
28th May 2022, 7:18 PM
JC Coder
JC Coder - avatar