wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Javascript

Total questions: 17

Worksheet time: 11mins

Name
Class
Date
1.
A string;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
2.
What surrounds a string?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
3.
To display writing on the screen you must include this direction;
a)
Document Write
b)
documentWrite
c)
document.write( )
d)
document.write
4.

Which of these will increase the value of the variable X?

a)

increment (x)

b)

x++;

c)

x=x;

d)

x+1;

5.

What is a variable

a)

Store values in containers so we can use them later.

b)

Store values in containers so we can use them never.

c)

Store values in containers so we can use them once.

d)

Store values in containers so we can't use them later.

6.

Javascript is _________ language.

a)

Programming

b)

Scripting

c)

Application

d)

applet

7.

JavaScript is ______ Side Scripting Language.

a)

JSP

b)

Servlet

c)

Server

d)

Browser

8.

JavaScript is designed for following purpose -

a)

To Style HTML Pages

b)

To Perform Server Side Scripting Opertion

c)

To add interactivity to HTML Pages.

d)

To Execute Query Related to DB on Server

9.

JavaScript Code is written inside file having extension __________.

a)

.jsc

b)

.jvs

c)

.js

d)

.javascript

10.
Indicates the beginning  and the end of a JavaScript section.
a)
<html> </html>
b)
<style> </style>
c)
<article> </article>
d)
<script> </script>
11.
Which keyword do we need to define a function?
a)
function
b)
method
c)
onclick
d)
functionName()
12.

How can a developer show a pop-up message to the user?

a)

alert

b)

prompt

c)

console.log

d)

<p> tag

13.
Which message will the user see?
a)
"Hello user"
b)
No message
c)
"Goodbye user"
d)
"message + user"
14.
How do I declare a new variable?
a)
var newVariable = 5;
b)
Variable int = new Variable();
c)
var 5 = myVariable;
d)
int var = 5;
15.
How do we generate a random number?
a)
Math.random()
b)
random.number()
c)
number.random()
d)
Random.math()
16.

Which of the following platform(s) can be used to run Javascript Code

a)

Google Chrome

b)

Firefox

c)

Microsoft Edge

d)

Safari

17.
Which attribute(s) of the FORM and INPUT tags become the properties of the created object?
a)
value
b)
value and name
c)
name
d)
name and type