wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaScript Basics Quiz

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What does JavaScript help a website do?

a)

Become interactive

b)

Print faster

c)

Load music automatically

d)

Change your computer settings

2.

Which is an example of JavaScript in action?

a)

A button that shows a message when clicked

b)

A paragraph written in HTML

c)

A picture made in Paint

d)

A file saved on your desktop

3.

(Situational) Your webpage has a button, but nothing happens when you click it. What do you need?

a)

More pictures

b)

JavaScript to make the button work

c)

A longer title

d)

A new background

4.

Why is JavaScript important?

a)

It makes videos louder

b)

It makes websites respond to the user

c)

It changes WiFi speed

d)

It removes images

5.

(Situational) Your classmate wants their website to show a greeting like “Hello!” when someone presses a button. What should they use?

a)

JavaScript

b)

A text file

c)

A screenshot

d)

A bookmark

6.

What does JavaScript often control on a webpage?

a)

Food recipes

b)

User interactions

c)

Phone contacts

d)

Printer ink

7.

(Situational) A user types their name into a box, and the website shows “Welcome, [Name]!” What made this possible?

a)

JavaScript

b)

Wallpaper

c)

An email

d)

A screenshot

8.

Which is an event that JavaScript can detect?

a)

Closing a book

b)

Clicking a button

c)

Charging a phone

d)

Turning off the lights

9.

(Situational) Your teacher asks you to make a webpage where the color changes when you press a button. What should you write?

a)

A JavaScript function

b)

A poem

c)

A shopping list

d)

A random paragraph

10.

How does JavaScript help the user experience?

a)

By making websites frozen

b)

By adding fun and useful actions

c)

By removing all text

d)

By hiding the page