wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Hackharbor 3.0 Day 4:Tech

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which statement below accurately describes JavaScriptʼs typing system?

a)

JavaScript requires explicit data type declaration for every variable

b)

JavaScript is statically typed like C

c)

JavaScript is dynamically typed and infers the data type at runtime

d)

JavaScript cannot change a variableʼs type once assigned

2.

Whatʼs the difference between null and undefined in JavaScript?

a)

Both mean the same: variable has no value

b)

null means variable is declared but empty, undefined means variable does not exist

c)

undefined means variable is declared but not assigned; null is an assigned “empty” value

d)

None, they are interchangeable

3.

What will happen if you omit semicolons at the end of statements in JavaScript?

a)

JavaScript inserts them automatically in most cases

b)

The script will never run

c)

It causes syntax errors every time

d)

The browser ignores the whole script

4.

Which one of these is the recommended way to attach multiple event listeners to the same button?

a)

Use multiple onclick attributes on button element

b)

Use inline onclick plus .addEventListener()

c)

Use .addEventListener() multiple times on the button element

d)

Overwrite the buttonʼs .onclick property multiple times

5.

Why did JavaScript go to therapy?

a)

Because it had too many types of issues: null, undefined, and mixed feelings about == vs ===!

b)

To learn Python

c)

Because it couldnʼt decide if it wanted to be static or dynamic

d)

It wanted a break from browsers

6.

If you place a