var i = 0; while(i < 100){ return \"The number is \" + i; i++; }
What is wrong with my return statement? Why can I return a string plus a
First of all your code should be inside a function. Secondly the return statement which u have written inside the for loop will execute the result only once and it will come out of the entire function.