JavaScript Quiz

Test your knowledge in JavaScript


1. A function's default return value is:




2. Which of the following is not a Math method?




3. If a function declares a new local variable (using var) that has the same name as a global variable, the function uses




4. What purpose does myFunction serve here?
function myFunction() {
  document.getElementById("demo").innerHTML = "Hello World!";
}




5. What does the following expression evaluate to?
var e = "fed";
/e{0,2}/.test(e);