Question:

What does the following code print to the console?

function dog () {};
console.log(dog.name);

Answer:

"dog"

Functions have a name property that corresponds with the name of the function.


Keywords:

© 2017 QuizBucket.org