Question:

What does the following code print to the console?

console.log(function () {
  return "Hey hey hey";
}());

Answer:

"Hey hey hey"

Notice that the function is defined and invoked in a single statement.


Keywords:

© 2017 QuizBucket.org