wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Pre-Test: JavaScript Fundamentals (Part 1)

Total questions: 30

Worksheet time: 10mins

Name
Class
Date
1.

It contains JavaScript code which is automatically executed when the browser processes the tag.

a)

<html> tag

b)

<script> tag

c)

<head> tag

d)

none of the above

2.

Scripts that are inside the HTML code.

a)

Internal Scripts

b)

External Scripts

c)

Absolute Scripts

d)

Relative Scripts

3.

The script is from the current page folder.

a)

Internal Scripts

b)

External Scripts

c)

Absolute Scripts

d)

Relative Scripts

4.

Syntax constructs and commands that perform actions.

a)

Semicolon

b)

Scripts

c)

Statements

d)

Comments

5.

Use as separators for each statements; may be omitted in most cases when a line break exists.

a)

Semicolon

b)

Scripts

c)

Statements

d)

Comments

6.

Doesn’t affect the execution of the program because the engine simply ignores them.

a)

Semicolon

b)

Scripts

c)

Statements

d)

Comments

7.

A type of comment that starts with a two forward slash characters

a)

Semicolon

b)

Scripts

c)

Multiline Comments

d)

Single-Line Comments

8.

A type of comment that starts with a forward slash and an asterisk and end with an asterisk and a forward slash.

a)

Semicolon

b)

Scripts

c)

Multiline Comments

d)

Single-Line Comments

9.

A special directive that enables the new JavaScript modifications

a)

"use strict"

b)

<script> tag

c)

let

d)

var

10.

A modern variable declaration in JavaScript

a)

constant

b)

<script> tag

c)

let

d)

var

11.

A modern variable declaration in JavaScript

a)

"use strict"

b)

constants

c)

let

d)

var

12.

Words that cannot be used as variable names because they are used by the language itself.

a)

reserved words

b)

constants

c)

let

d)

var

13.

What is not a proper variable naming conventions.

a)

Use human-readable names.

b)

Stay away from abbreviations or short names.

c)

Make names maximally descriptive and concise.

d)

Do not Agree on terms within your team and in your own mind.

14.

A data type that represents both integer and floating point numbers.

a)

Number

b)

NULL

c)

String

d)

Boolean

15.

A data type was recently added to the language to represent integers of arbitrary length.

a)

Number

b)

BigInt

c)

String

d)

Boolean

16.

A data type in JavaScript must be surrounded by quotes.

a)

Number

b)

BigInt

c)

String

d)

Boolean

17.

A data type that is commonly used to store yes/no value.

a)

Number

b)

BigInt

c)

String

d)

Boolean

18.

A special value that does not belong to any of the data types discussed.

a)

Number

b)

NULL

c)

String

d)

Boolean

19.

A data type in which a value is not assigned.

a)

Undefined

b)

NULL

c)

Objects

d)

symbol

20.

A data type that is used to store collections of data and more complex entities.

a)

Undefined

b)

NULL

c)

Objects

d)

symbol

21.

A data type that is used to create unique identifiers for objects.

a)

Undefined

b)

NULL

c)

Objects

d)

symbol

22.

An operator that returns the type of argument.

a)

typeof operator

b)

arithmetic operator

c)

operator precedence

d)

logical operators

23.

An interaction in which it shows a message and waits for the user to press “OK”.

a)

prompt

b)

modal

c)

confirm

d)

alert

24.

It shows a modal window with a text message, an input field for the visitor, and the buttons OK/Cancel.

a)

prompt

b)

modal

c)

confirm

d)

alert

25.

It happens when we need the string form of a value

a)

String Conversion

b)

Numeric Conversion

c)

Boolean Conversion

d)

None of the Above

26.

It happens in mathematical functions and expressions automatically.

a)

String Conversion

b)

Numeric Conversion

c)

Boolean Conversion

d)

None of the Above

27.

It happens in logical operations but can also be performed explicitly

a)

String Conversion

b)

Numeric Conversion

c)

Boolean Conversion

d)

None of the Above

28.

It is the default priority order of operators.

a)

Operator List

b)

MDAS

c)

Arithmetic Operator

d)

Operator Precedence

29.

An operator that returns a value ( = )

a)

Operator List

b)

Assignment Operator

c)

Arithmetic Operator

d)

Operator Precedence

30.

It treat arguments as 32-bit integer numbers and work on the level of their binary representation.

a)

Bitwise Operators

b)

Assignment Operator

c)

Arithmetic Operator

d)

Operator Precedence