Java Script Quiz2 1. What is the syntax for defining a function in JavaScript? function myFunction() {} myFunction = function() {} Both a and b are correct. 2. Which of the following is not a valid variable name in JavaScript? myVariableName 123variable _variable 3. What is a function in JavaScript? It is a reserved keyword in JavaScript. It is a container for storing data values. It is a block of code designed to perform a specific task. 4. Which symbol is used to call a function in JavaScript? () {} [] 5. Which keyword is used to define a function in JavaScript? define function def 6. Which symbol is used to concatenate strings in JavaScript? + – * 7. What is a parameter in JavaScript? It is a variable declared inside a function. It is a value passed to a function when it is called. It is a reserved keyword in JavaScript. 8. Which statement is used to return a value from a function in JavaScript? yield return continue 9. Which statement is used to delete a variable? delete variableName; remove variableName; clear variableName; 10. Which statement is used to check if a variable is undefined? if (x === null) if (x === undefined) if (x === undefined) Loading … Question 1 of 10