Moodle JavaScript MCQ Test: Moodle JavaScript MCQs - Practice Questions
1. Which method is used to sort elements in an array in JavaScript?
2. Which statement is used to throw a custom error in JavaScript?
3. Which built-in method returns the character at the specified index?
4. How do you call a function named 'myFunction'?
5. What does the 'concat()' method do in JavaScript?
6. Which function is used to add an event listener to an HTML element?
7. What does the 'typeof' operator return for a null value?
8. Which method removes the last element from an array and returns that element?
9. Which built-in method returns the index within the calling String object of the first occurrence of the specified value?
10. Which method is used to join two or more arrays?