Latest Version Already Graded A
What will `console.log(!!"false")` output?
A) true
B) false
C) NaN
D) undefined
✔✔ A) true
What will `console.log([] == false)` return?
A) true
B) false
C) NaN
D) undefined
✔✔ A) true
Which function is used to execute a function after a delay?
A) `setInterval()`
1
,B) `setTimeout()`
C) `delay()`
D) `wait()`
✔✔ B) `setTimeout()`
What will `console.log(typeof function(){})` return?
A) "function"
B) "object"
C) "undefined"
D) "null"
✔✔ A) "function"
What happens when you do `console.log([] == ![])`?
A) true
B) false
C) NaN
D) undefined
✔✔ A) true
2
,Which of these is a valid way to create an object in JavaScript?
A) `let obj = {}`
B) `let obj = new Object()`
C) `let obj = Object.create(null)`
D) All of the above
✔✔ D) All of the above
How do you merge two arrays into one?
A) `arr1 + arr2`
B) `arr1.concat(arr2)`
C) `arr1.join(arr2)`
D) `arr1.append(arr2)`
✔✔ B) `arr1.concat(arr2)`
What will `console.log(Math.max())` return?
A) undefined
B) NaN
3
, C) 0
D) Infinity
✔✔ B) NaN
What is the purpose of `map()` in JavaScript?
A) To modify elements in an array without changing the original
B) To filter elements in an array
C) To remove elements from an array
D) To find an element in an array
✔✔ A) To modify elements in an array without changing the original
Which statement is true about JavaScript?
A) JavaScript is statically typed
B) JavaScript is dynamically typed
C) JavaScript does not support functions
D) JavaScript runs only on the server
✔✔ B) JavaScript is dynamically typed
4