6. Solo Flight - Quick question


My code runs just fine, however, I am wondering why you need the "soloLoop();" at the very end of the syntax and what purpose that portion of the code serves.

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



By putting soloLoop(); at the bottom, you're calling on your function and telling it to run.

If you hadn't, then it wouldn't run


Declared functions are not executed immediately. They are "saved for later use", and will be executed later, when they are invoked (called upon).

test your code without soloLoop();

so remember you have to call the function to make it any use.


understood! Thank you.


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