JavaScript Basics
Variables
Data Types
Function & Logic
Arrays & Objects
100

What is JavaScript mainly used for on a website?

To make websites interactive and dynamic.

100

What do we use to store information in JavaScript?

A variable

100

What type of data is surrounded by quotes?

A string (text).

100

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

100

What is a list of items called in JavaScript?

An array.

200

Where does JavaScript run — on the user’s computer or the web server?

On the user’s computer (in the browser).

200

What word do we use to create a new variable?

let

200

What type of data is a value like 10 or 3.5?

A number

200

What keyword (reserved keywords) starts a function?

Function.
200

How are array items separated?

By Commas.

300

What kind of language is JavaScript — markup, styling, or programming?

Programming language.

300

Can a variable name start with a number? Yes or No

No.

300

What value means “true or false”?

A boolean.

300

What do we call the information we send into a function?

Arguments or inputs.

300

What do we use to store related information (like name and age together)?

An object.

400

What file extension is used for JavaScript files?

.js

400

If I write let age = 25, what is the value of the variable?

25

400

What value means “nothing” or “empty”?

Null.

400

What does an “if” statement do?

It checks if something is true before running code.

400

What do arrays use to find an item — names or numbers?

Numbers (indexes).

500

What do we call a small piece of code that tells the computer what to do?

A script or a Program.

500

If I change the value of a variable, does it keep the old one?

No, it gets replaced by the new value.

500

Is “42” the same as 42 in JavaScript?

No, one is text and the other is a number.

500

What happens if an “if” condition is false?

The code inside it is skipped.

500

Which one is best for storing many similar things — an array or an object?

An array.

M
e
n
u