Solo flight; syntax error: unexpected end of input....HELP!


var i = true;
var soloLoop = function(){
//Your code goes here!
while(i = 1){
console.log("Looped once!");
i = false;



You're missing one curly bracket for the function you created before the quoted above.


You then should have:

var soloLoop = function() {
    while (condition) {
  //Your code goes here!
  console.log("Looped once!");
  condition = false;



it worked. thanks.....


You're welcome.

Have fun coding! :slight_smile:


count = 0;
while( i < 20){
i= true;
for( var i === 0; i > 20; i++){
whats wrong with this code please


You assign true to i at the end of the while loop which will make it run forever.



What are you trying to achieve here:

Also, why this?

You really should have opened a new discus for this. :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.