wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JavaScript Basic Terminology

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

Which of the following is the correct Javascript format for a comment?

a)

// "the text"

b)

/"the text"/

c)

*/"the text"/*

d)

\\"the text

2.
The conditional statement, in Javascript, begins with the word _______.
a)
Then
b)
Else
c)
If
d)
OK
3.
Indicates the beginning  and the end of a JavaScript section.
a)
<html> </html>
b)
<style> </style>
c)
<article> </article>
d)
<script> </script>
4.
A user-defined name for a memory location whose value can change over time.
a)
variable
b)
syntax
c)
operator
d)
token
5.
In JavaScript, you should include a semi-colon at the end of each statement.
a)
yes
b)
no
6.
A JavaScript file has an extension name of
a)
.jscp
b)
.js
c)
.css
d)
.Jp
7.

Where does JavaScript code go in an HTML document?

a)

<script> tag

b)

<html> tag

c)

<style> tag

d)

<button> tag

8.
Which keyword do we need to define a function?
a)
function
b)
method
c)
onclick
d)
functionName()
9.
Which of the following best describes what a function is used for?
a)
they create new variable commands
b)
they are used for difficult math formulas
c)
they are reusable pieces of code that can be called any time in the program
d)
they allow for the use of mathematical operators
10.
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
11.

Bonus Question: What is the web programming Trifecta?

a)

HTML, CSS, Javascript

b)

Java, C+, HTML

c)

Java, HTML, CSS

d)

Kobe, Labron, Jordan

12.

Why do we use if/else statements in JavaScript?

a)

To repeat something for a fixed number of times

b)

To either do something if a condition is true or do something else

c)

To break out of some block of code

d)

To repeat something while a condition is true

13.

When we are done with a line what do we put at the end?

a)

a colon :

b)

a semi-colon ;

c)

a period .

d)

a quotation mark "

14.

A programming language used for webpage functionality such as interactivity, data processing, animation, and development of purpose built apps such as mobile and desktop apps and more.

a)

HTML5

b)

CSS

c)

JS

d)

C#

15.

Conditions return values of which data type?

a)

Integer

b)

boolean

c)

floating-point

d)

string

16.
A condition is __________.
a)
any expression that evaluates to True or False
b)
a built-in function that assigns a Boolean value to a variable
c)
a formula that is executed for a result
d)
an operand that indicates both conditions are True or False
17.

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

a)

If Else Statement

b)

Condition

c)

If Statement

d)

Parentheses

18.

Which is not a part of the Web Trifecta?

a)

HTML

b)

CSS

c)

Python

d)

JavaScript

19.

JavaScript is free for everyone to use.

a)

True

b)

False

20.
What's the data type?
a)
String
b)
Number