1. How can you prompt the user for input in JavaScript? prompt() input() userPrompt() getInput() Wrong 2. What is the purpose of the 'alert()' function in JavaScript? Displaying a message in the console Showing a popup alert to the user Executing a loop Handling errors Wrong 3. What is the purpose of variables in JavaScript? To store and manage data To perform mathematical calculations To control the flow of the program To define HTML elements Wrong 4. What is the result of the expression: 10 + '5' in JavaScript? 15 105 TypeError 50 Wrong 5. How do you display output in the browser console in JavaScript? console.display() log.console() print() console.log() Wrong 6. What is the correct way to comment a single-line in JavaScript? // This is a comment # This is a comment <!-- This is a comment --> /** This is a comment */ Wrong 7. What does the term 'concatenation' mean in JavaScript? Joining two or more strings together Performing arithmetic addition Creating an array Defining a function Wrong 8. Which keyword is used to declare a variable in JavaScript? var let const variable Wrong 9. Which data type is used for true/false values in JavaScript? String Number Boolean Undefined Wrong 10. Which symbol is used for comments that span multiple lines in JavaScript? /* */ // # <!-- --> Wrong Result: Share on Facebook