Podcast
Questions and Answers
What is the purpose of the function called prompt() ?
What is the purpose of the function called prompt() ?
- To display a message without asking for intriing
- To ask for the user's age and display a message
- To display a message without asking for the user's name
- To ask for the user's name and display a message (correct)
What is the use of the '+' operator in JavaScript?
What is the use of the '+' operator in JavaScript?
- To add numbers
- To divide values
- To concatenate strings (correct)
- To subtract strings
What are the two ways to add JavaScript to a web page?
What are the two ways to add JavaScript to a web page?
- Embed JavaScript code in an HTML file and link to a separate JavaScript file (correct)
- Link to a separate HTML file and embed JavaScript code in a CSS file
- Embed JavaScript code in an HTML file and link to a separate CSS file
- Link to a separate CSS file and embed JavaScript code in a JavaScript file
What is the purpose of the
What is the purpose of the
Where can the
Where can the
What are function parameters used for?
What are function parameters used for?
What happens when a function is called?
What happens when a function is called?
What is the purpose of the 'prompt()' method?
What is the purpose of the 'prompt()' method?
What is the purpose of the 'alert()' method?
What is the purpose of the 'alert()' method?
How many times is the 'greeting' function called in the example?
How many times is the 'greeting' function called in the example?
What is stored in the variable 'name'?
What is stored in the variable 'name'?