Question:

What does the following code print to the console?

var cat = function(x) {
  return x * 2;
}
console.log(cat.name);

 

Answer:

""

The name property for anonymous functions returns an empty string.


Keywords:

© 2017 QuizBucket.org