Javascript Quiz JavaScript Quiz 1 / 20What does DOM stand for in JavaScript? Document Object Model Data Object Model Dynamic Object Model Document Order Model 2 / 20What is the purpose of the addEventListener() method in JavaScript? To remove an event listener To add an event listener To execute an event immediately To modify the HTML content 3 / 20Which method is used to add a new element to the end of an array? append() push() add() insert() 4 / 20What is the result of 5 + '5' in JavaScript? 0 Error undefined 55 5 / 20Which function is used to print something in the console in JavaScript? log() print() console.log() display() 6 / 20What keyword is used to declare a variable in JavaScript? var let const All of the above 7 / 20What does the === operator check for in JavaScript? Value and type equality Value equality only Type equality only Reference equality 8 / 20What method is used to remove the last element from an array in JavaScript? pop() remove() splice() slice() 9 / 20How can you check the type of a variable in JavaScript? typeof operator typeOf() function checkType() method getType() function 10 / 20Which symbol is used for comments in JavaScript? // -- %% /* */ 11 / 20What does JSON stand for in JavaScript? JavaScript Object Notation JavaScript Oriented Navigation JavaScript Operator Notation JavaScript Ordered Notation 12 / 20How do you declare a function in JavaScript? function myFunction() {} func myFunction() {} def myFunction() {} fn myFunction() {} 13 / 20What is the purpose of the querySelector() method in JavaScript? To select multiple elements To select the first element that matches a CSS selector To modify the CSS of an element To create a new HTML element 14 / 20Which method is used to remove the first element from an array in JavaScript? shift() pop() removeFirst() unshift() 15 / 20What is the result of typeof NaN in JavaScript? a) "number" b) "NaN" c) "undefined" d) "object" "number" "NaN" "undefined" "object" 16 / 20What does the setTimeout() function do in JavaScript? Delays the execution of a function by a specified number of milliseconds Sets a timeout for an AJAX request Sets a timeout for an event listener Stops the execution of a function immediately 17 / 20What does AJAX stand for in JavaScript? Asynchronous JavaScript and XML Asynchronous JavaScript and XHTML Asynchronous JavaScript and JSON Asynchronous JavaScript and HTML 18 / 20Which built-in method is used to sort the elements of an array in JavaScript? a) b) c) d) sort() order() arrange() organize() 19 / 20What keyword is used to declare a block scope variable in JavaScript? var let const block 20 / 20What is the purpose of the forEach() method in JavaScript arrays? To iterate over array elements and modify them To check if an array includes a certain element To create a new array from the existing one To execute a function for each array element Your score isThe average score is 65% 0% Restart quiz