10. to learn it, you gotta do it


It's is not clear to me why we need the syntax below.

"var getToDaChoppa = function( ) {
getToDaChoppa( );"

The code worked just fine without this syntax.

Thank you !

var getToDaChoppa = function(){
  var getToDaChoppa = false;
  do {
      console.log("Run the loop at least once plzzzzzz");    
  } while (getToDaChoppa);



Of course, this code works without the function. But what to do if you need repeat same code few times? Don't Repeat Yourself (D.R.Y) is important programming principle and functions helps us to avoid repeating.
So, I think this lesson is for practice function with loop.


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