Take this intermediate programming test online with 15 medium-difficulty questions on JavaScript and web development.
1. What is React primarily used for?
💡 React is a popular JavaScript library used for building interactive user interfaces.
2. What is a JavaScript function used to display an alert box called?
💡 The alert() function displays a popup alert box with a specified message.
3. What does 'npm' stand for?
💡 npm stands for Node Package Manager, used to install and manage JavaScript packages.
4. What does 'addEventListener' do in JavaScript?
💡 'addEventListener' attaches a function that runs when a specified event occurs on an element.
5. What is the purpose of 'querySelector' in JavaScript?
💡 'querySelector' selects the first HTML element that matches a specified CSS selector.
6. What is the purpose of 'const' in JavaScript?
💡 'const' declares a variable whose reference cannot be reassigned after its initial value is set.
7. Which keyword declares a variable in modern JavaScript that can be reassigned?
💡 'let' declares a block-scoped variable in modern JavaScript that can be reassigned later.
8. What does 'NaN' stand for in JavaScript?
💡 'NaN' stands for 'Not a Number', representing an invalid or undefined numeric result.
9. What does 'async/await' help manage in JavaScript?
💡 'async/await' provides a cleaner syntax for working with asynchronous operations in JavaScript.
10. What is a callback function?
💡 A callback function is passed as an argument to another function and executed at a later point.
11. What does '===' check for in JavaScript?
💡 '===' checks for strict equality, comparing both the value and the type of two operands.
12. What does 'localStorage' allow in JavaScript?
💡 'localStorage' allows web applications to store data in the browser that persists even after the browser is closed.
13. What does 'DOM manipulation' refer to?
💡 DOM manipulation involves using JavaScript to dynamically change a webpage's content or structure.
14. What does AJAX allow web pages to do?
💡 AJAX allows web pages to update content asynchronously without needing a full page reload.
15. What is JSON commonly used for?
💡 JSON is commonly used to exchange structured data between a server and client application.