Question:

What does the following code print to the console?

blah = function () {
  return lala;
  lala = "hi";
};
console.log(blah());

 

Answer:

This raises a ReferenceError because the lala variable cannot be returned before it's defined.


Keywords:

© 2017 QuizBucket.org