The Language
Question #13
A) doSomething();
B) doSomething.call();
C) doSomething.apply();
D) All of the above
Question #14
A) function
B) catch
C) array
D) this
Question #15
A) Boolean("")
B) Boolean("false")
C) Boolean(0)
D) Boolean(NaN)
Question #16
A) randomNumber()
B) rand()
C) Number.random()
D) Math.random()
Question #17
A) Every object is a function
B) Every function is an object
C) A function always returns an object
D) Only pure functions are objects
Question #18
A) false
B) 0
C) true
D) ReferenceError
Question #19
A) 3 == '3'
B) 3 === '3'
C) 3 != '3'
D) [3] == [3]
Question #20
A) undefined
B) true
C) One
D) Two
Question #21
A) You can’t use the let
keyword in a top-level scope
B) JavaScript requires new lines after curly brackets and semicolons
C) In JavaScript, the if
keyword starts a statement, not an expression
D) The ==
operator is not a valid one in JavaScript
Question #22
A) new
B) render
C) create
D) constructor
Question #23
A) You are calling a method named reduce
on an object that’s declared but has no value
B) You are calling a method named reduce
on an object that does not exist
C) You are calling a method named reduce
on an object that’s has a null value
D) You are calling a method named reduce
on an empty array
Question #24
A) let
B) var
C) const
D) They all behave exactly the same for both types of scopes
Question #25
A)
(function() { // code here })();
B)
void function() { // code here }();
C)
(function() { // code here }());
D) All of the above
Question #26
A) delay(1000, fn);
B) setTimeout(fn, 1000);
C) sleep(1000); fn;
D) setDelay(fn, 1000);
Question #27
A) argumentsList
B) argsArray
C) args
D) arguments
Question #28
A) It will print: hello
B) It will print: 42
C) It will print: hello.42
D) It will throw an error
Question #29
A) undefined
then undefined
B) 1
then undefined
C) 1
then 1
D) undefined
then 1
Question #30
A) 1
B) 2
C) undefined
D) This code will throw an error
Question #31
A) Scopes have a lifetime
B) Closures span multiple scopes
C) Closures enable both read and write access
D) All of the Above
Question #32
A) typeof NaN === 'number'
B) typeof '' === 'string'
C) typeof undefined === 'undefined'
D) All of the above