Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

JavaScript Developer I Set 2

Total questions: 60

Worksheet time: 5hrs 0mins

Name
Class
Date
1.
a)

super.size = size;

b)

ship.size = size;

c)

super (size);

d)

this.size = size;

2.
a)

global variables

b)

IIFEs

c)

localStorage

d)

cookies

e)

indexDB

3.

Which statement parses successfully ?

a)

JSON.parse('"foo"');

b)

JSON.parse('foo');

c)

JSON.parse('foo');

d)

JSON.parse(" 'foo ' ");

4.
a)
b)
c)
d)
5.
a)

console.debug(number & 2 === 0);

b)

console.assert(number & 2 === 0);

c)

console.error(number & 2 === 0);

d)

assert(number & 2 === 0);

6.
a)
b)
c)
d)
7.
a)
b)
c)
d)
8.
a)
b)
c)
d)
9.
a)
b)
c)
d)
10.
a)
b)
c)
d)
e)
11.
a)

[1, 2]

b)

["foo" , "bar"]

c)

["foo:1" , "bar:2"]

d)

An error will occur due to the incorrect usage of the for...of statement on line 07.

12.
a)

Browser JavaScript console

b)

On the webpage

c)

Browser performace tools

d)

Terminal running the web server

13.
a)
b)
c)
d)
14.
a)

Car 1 crashed in the race

b)

Race is cancelled

c)

Car 3 completed the race

d)

Car 2 completed the race

15.
a)

str1.join(str2);

b)

str1.concat(str2);

c)

concat (str1 , str2);

d)

' $(str1) $(str2) ';

e)

str1 + str2 ;

16.
a)
b)
c)
d)
17.
a)
b)
c)
d)
e)
18.
a)
b)
c)
d)
19.
a)

default

b)

all

c)

mult

d)

named

20.
a)

isNaN(value)

b)

Object.is(value, NaN)

c)

value === Number.NaN

d)

value == NaN

21.

Give the following code, what is the value of x ?

let x= ′15′+(10∗2);let\ x=\ '15'+(10*2);  

a)

35

b)

50

c)

1520

d)

3020

22.
a)
b)
c)
d)
23.
a)
b)
c)
d)
24.
a)

node --inspect-brk index.js

b)

node --inspect index.js

c)

node -i index.js

d)

node inspect index.js

25.

Which is true about the strict mode in imported modules ?

a)
b)
c)
d)
26.
a)

message

b)

assert

c)

info

d)

log

e)

error

27.

A developer is trying to handle an error within a function

Which code segment shows the correct approach to handle an error without propagating it elsewhere ?

a)
b)
c)
d)
28.
a)

2.1.2

b)

2.2.0

c)

2.2.1

d)

3.1.1

29.
a)

Decimal

b)

Float

c)

Number

d)

Double

30.
a)
b)
c)
d)
31.
a)
b)
c)
d)
e)
32.
a)
b)
c)
d)
33.
a)
b)
c)
d)
34.
a)

event.clicked

b)

e.nodeTarget == this

c)

button.addEventListener('click')

d)

event.target.nodeName == 'BUTTON'

35.
a)

1 2 3

b)

1 3 2

c)

2 1 3

d)

2 3 1

36.
a)

console.getTime()

b)

console.timeStamp()

c)

console.timeLog()

d)

console.trace()

37.
a)

userInformation.get('age');

b)

userInformation.age;

c)

userInformation('age');

d)

const (age) = userInformation;

38.
a)

Success Start End

b)

End Start Success

c)

Start Success End

d)

Start End Success

39.
a)

undefined Developer

b)

John Developer

c)

Error: myFather.job is not a function

d)

John undefined

40.
a)
b)
c)
d)
41.
a)
b)
c)
d)
42.

Which statement can a developer apply to increment the browser's navigation history without a page refresh ?

a)

window.history.pushState(newStateObject);

b)

window.history.pushState(newStateObject,' ', null);

c)

window.history.state.push(newStateObject);

d)

window.history.replaceState(newStateObject,' ', null);

43.
a)
b)
c)
d)
e)
44.
a)

1 2 3 4 5

b)

1 2 5 3 4

c)

2 5 1 3 4

d)

2 5 3 4 1

45.
a)
b)
c)
d)
46.
a)

Gatsby

b)

Angular

c)

Express

d)

Koa

47.

Which function should a developer use to repeatedly execute code at a fixed time interval ?

a)

setTimeout

b)

setPeriod

c)

setInterim

d)

setInterval

48.
a)
b)
c)
d)
49.
a)

str.substr(1 , 5);

b)

str.substr(0 , 5);

c)

str.substring(1 , 5);

d)

str.substring(0 , 5);

50.
a)

let arr2 = arr1;let\ arr2\ =\ arr1;  

b)

let arr2 = arr1.sort();let\ arr2\ =\ arr1.sort\left(\right);  

c)

let arr2 = Array.from(arr1);let\ arr2\ =\ Array.from\left(arr1\right);  

d)

let arr2 = arr1.slice(0 , 5);let\ arr2\ =\ arr1.slice\left(0\ ,\ 5\right);  

51.
a)
b)
52.
a)

'yellow' : null

b)

null : 'yellow'

c)

'nome' : 'yellow'

d)

'yellow' : 'nome'

53.
a)
b)
c)
d)
54.
a)
b)
c)
d)
55.

Which statement accuratelly describe as aspect of promises ?

a)
b)
c)
d)
56.
a)
b)
c)
d)
57.
a)

object.freeze()

b)

object.seal()

c)

object.lock()

d)

object.const()

58.

Which two logs output NaN ?

Chosse 2 answers

a)

console.log(10 / 'five');

b)

console.log(parseInt('two'));

c)

console.log(10 / Number('5'));

d)

console.log(10 / 0);

59.
a)

0 1 2 3 4

b)

0 2 4 1 3

c)

0 2 4 3 1

d)

1 3 0 2 4

60.
a)
b)
c)
d)