wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JavaScript 1st Quarter Test

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Which statement will correctly call a JavaScript function?

a)

myFunction()

b)

initiate myFunction()

c)

call myFunction()

d)

var myFunction()

2.

Which JavaScript statement should you use to branch to one of two processes

depending on the result of a test condition?

a)

if...else

b)

break

c)

for

d)

do...while

3.

Which JavaScript code is used to define a function?

a)

define myFunc { return value; }

b)

define myFunc() { }

c)

abra kadabra () { }

d)

function myFunc() { }

4.

Which JavaScript operator indicates assignment? For example, assigning a value to a variable.

a)

==

b)

!

c)

=>

d)

=

5.
Arithmetic Operators - 
What is + ?
a)
Addition
b)
Subtraction
c)
Multiplication
d)
Division
6.
Arithmetic Operator
What is a - ?
a)
Addition
b)
Subtraction
c)
Multiplication
Multiplication
d)
Modulo
7.
Comparision Operators
What is == ? 
a)
Equal to 
b)
Equal value and equal type
c)
Not equal
d)
Not equal value or not equal type
8.
What syntax follows after an if statement?
a)
parenthesis
b)
curly braces
c)
a colon
d)
square brackets
9.

In JavaScript, which of the following items allows you to store user-entered or

developer-defined data and use it more than once?

a)

Operator

b)

Keyword

c)

Concatenation

d)

Variable

10.

Loops in programming start counting from ?

a)

0

b)

1

c)

Any number

11.
Generally speaking, what functionality does JavaScript provide when used as part of the "Web development trifecta"?
a)
Page manipulation capabilities and advanced interactivity
b)
Content and page structure, but minimum interactivity
c)
Formatting and page design, plus some simple interactivity
d)
Content, page structure, and advanced interactivity
12.
JavaScript is a scripting language. Scripting languages:
a)
interpret and automate a list of tasks that would otherwise be executed one-at-a-time by a person.
b)
interpret and execute a list of tasks once the list is compiled.
c)
need the server to interpret a script and to return the appropriate responses.
d)
perform their functionality on the server side, which reduces processing time dramatically.
13.

Which of these is a loop?

a)

if(x<10)

b)

while(x<10)

c)

var x=10;

d)

text(x,10;10)

14.

Where do the <script></script> tags go in your html document

a)

Within <img> tags

b)

In the <p></p> tags

c)

In the <title>

d)

In the <head> or <body>

15.

Statement lets you ask a question to the program and only run code if the answer is true.

a)

how Statement

b)

Condition

c)

If Statement

d)

Parentheses

16.

Control structure that lets us do either one section of code or another depending on a test.

a)

If Else Statement

b)

Condition

c)

If Statement

d)

Parentheses

17.
A user-defined name for a memory location whose value can change over time.
a)
variable
b)
syntax
c)
operator
d)
token
18.
In JavaScript, you should include a semi-colon at the end of each statement.
a)
yes
b)
no
19.
What best describes the function of a for loop?
a)
it loops through a block of code for a finite amount of times
b)
it looks for a loop in a block of code
c)
it loops through code only within a function
d)
it loops through a block of code forever
20.
What surrounds a string?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
21.
A JavaScript file has an extension name of
a)
.jscp
b)
.js
c)
.css
d)
.Jp
22.

The constructs that listen out for the event happening are called __________

a)

event listener

b)

event handler

c)

action handle

d)

functions

23.

In programming, what term is used for the process of troubleshooting and repairing code that does not work properly or at all?

a)

Testing

b)

Compiling

c)

Interpreting

d)

Debugging

24.

Variable names cannot start with numbers.

a)

True

b)

False

25.
To display writing on the screen you must include this direction;
a)
Document Write
b)
documentWrite
c)
document.write( )
d)
document.write