wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JSProg

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

NaN stands for_________.

a)

Nano 

b)

NanTech

c)

Not  a number   

d)

New attacted Nematic

2.

++ operator in Java Script is ____ Operator.

a)

Unary 

b)

Positive 

c)

Increment 

d)

Addition

3.

When a user views a page containing a java script program, which machine actually executes the script?

a)

The user’s machine running offline  

b)

The user’s machine running  a web browser  

c)

The user’s machine running on a website  

d)

The users cookies used by a website

4.

______ side java script statements embedded in  a HTML Page can respond to user events such as mouse-clicks, forms input and page navigation.

a)

client

b)

Server   

c)

Website 

d)

Live wire

5.

What will be the output of the following JavaScript code?

a)

10

b)

50

c)

5

d)

Error

6.

Arrays in JavaScript are defined by which of the following statements?

a)

It is an ordered list of values

b)

It is an ordered list of objects

c)

It is an ordered list of string

d)

It is an ordered list of functions

7.

What will be the output of the following JavaScript code?

a)

false

b)

true

c)

compilation error

d)

runtime erro

8.

What will be the output of the following JavaScript code snippet?

a)

false

b)

true

c)

compilation error

d)

runtime error

9.

Java script is interpreted by ______.

a)

client    

b)

Server  

c)

Website 

d)

Live wire

10.

Javascript variables are ______ typed.

a)

statically  

b)

strongly 

c)

dynamically

d)

globally

11.

Which of the following scoping type does JavaScript use?

a)

Sequential

b)

Segmental

c)

Lexical

d)

Literal

12.

What will be the output of the following JavaScript code?

a)

1, 2, 3, 6, 7, 8

b)

123

c)

1, 2, 3

d)

Error

13.

What will be the function of the following JavaScript program?

a)

Returns the value in scope

b)

Returns value null

c)

Shows an error messag

d)

Returns exception

14.

Why event handlers is needed in JS?

a)

Allows JavaScript code to alter the behaviour of windows

b)

Adds innerHTML page to the code

c)

Change the server location

d)

Performs handling of exceptions and occurrences

15.

Javascriptcomplies with______ standard.

a)

Indian

b)

British

c)

ASCII

d)

ECMA-262 & ISO/IEC 16262

16.

Which of the following is the correct output for the following JavaScript code:

a)

1

b)

Error

c)

10

d)

5

17.

Which of the following is the correct output for the following JavaScript code:

a)

9

b)

0

c)

8

d)

Undefined

18.

Which of the following is the correct output for the following JavaScript code:

a)

10

b)

9

c)

8

d)

0

19.

Which of the following is the correct output for the following JavaScript code:

a)

3

b)

0

c)

error

d)

2

20.

In the JavaScript, which one of the following is not considered as an error:

a)

Syntax error

b)

Missing of semicolons

c)

Division by zero

d)

Missing of Bracket