Question:

What does the following function print to the console?

function a(x, y, z) {
  return z;
}
console.log(a("blah"));

Answer:

undefined

When too few arguments are supplied to a function, JavaScript assigns the missing arguments to undefined.


Keywords:

© 2017 QuizBucket.org