What is JavaScript mainly used for on a website?
To make websites interactive and dynamic.
What do we use to store information in JavaScript?
A variable
What type of data is surrounded by quotes?
A string (text).
What is a function used for?
is used to group a set of instructions that perform a specific task — so you can reuse that code whenever you need it
What is a list of items called in JavaScript?
An array.
Where does JavaScript run — on the user’s computer or the web server?
On the user’s computer (in the browser).
What word do we use to create a new variable?
let
What type of data is a value like 10 or 3.5?
A number
What keyword (reserved keywords) starts a function?
How are array items separated?
By Commas.
What kind of language is JavaScript — markup, styling, or programming?
Programming language.
Can a variable name start with a number? Yes or No
No.
What value means “true or false”?
A boolean.
What do we call the information we send into a function?
Arguments or inputs.
What do we use to store related information (like name and age together)?
An object.
What file extension is used for JavaScript files?
.js
If I write let age = 25, what is the value of the variable?
25
What value means “nothing” or “empty”?
Null.
What does an “if” statement do?
It checks if something is true before running code.
What do arrays use to find an item — names or numbers?
Numbers (indexes).
What do we call a small piece of code that tells the computer what to do?
A script or a Program.
If I change the value of a variable, does it keep the old one?
No, it gets replaced by the new value.
Is “42” the same as 42 in JavaScript?
No, one is text and the other is a number.
What happens if an “if” condition is false?
The code inside it is skipped.
Which one is best for storing many similar things — an array or an object?
An array.