11 Questions
What is the purpose of the function called prompt() ?
To ask for the user's name and display a message
What is the use of the '+' operator in JavaScript?
To concatenate strings
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
What is the purpose of the
To embed JavaScript code in an HTML file
Where can the
Inside the or tag
What are function parameters used for?
To take inputs and help the function run
What happens when a function is called?
It takes inputs and returns a value when complete
What is the purpose of the 'prompt()' method?
To ask the user for input
What is the purpose of the 'alert()' method?
To display a message on the screen
How many times is the 'greeting' function called in the example?
Twice
What is stored in the variable 'name'?
The user's name entered through the prompt
Explore the concepts of JavaScript AJAX, which allows your browser to communicate with a server in the background and update web pages with new information. Learn about the different structure and format of JavaScript compared to HTML and CSS, as well as its capabilities in storing data, conditional programming, and naming conventions.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free