Computer Science Exam MCQs - Part 4
10 multiple-choice questions (MCQs) on JavaScript 31) What is JavaScript? A) A programming language for creating dynamic web pages B) A markup language for styling web pages C) A database management system D) A descendant language from Java 32) Which keyword is used to declare a variable in JavaScript? A) var B) let C) const D) All of the above 33) What does the typeof operator return when applied to an array? A) "array" B) "object" C) "array" D) "undefined" 34) Which of the following is not a valid way to declare a function in JavaScript? A) function myFunction() {} B) var myFunction = function() {} C) const myFunction = () => {} D) let myFunction() {} 35) What does the === operator do in JavaScript? A) Checks for equality without type conversion B) Checks for equality with type conversion C) Assigns a value to a variable D) None of the above 36) Which method is used to add an element to the end of an array? A) push() B) pop() C) shift() D) u...