Question:

What does the following code print to the console?

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

 

Answer:

"blabbermouth"

Functions have a name property that returns the name of a function. JavaScript functions are objects and can have properties like any other object.


Keywords:

© 2017 QuizBucket.org