Skip to main content

Fundamentals of Front End Development MCQs with Answers

Practice important Fundamentals of Front End Development MCQs with answers and explanations.

Chapter: 77
Q861:
What will typeof function() {} return?
A. function
B. object
C. string
D. undefined
Correct Answer: A
Chapter: 77
Q862:
Which of the following will return function Array { … }?
A. [1,2,3,4].constructor
B. new Date().constructor
C. function(){}.constructor
D. "John".constructor
Correct Answer: A
Chapter: 77
Q863:
Fill in the blank: The constructor property for a string "John" is _____
A. function String { … }
B. function Number { … }
C. function Boolean { … }
D. function Object { … }
Correct Answer: A
Chapter: 77
Q864:
What does typeof NaN return?
A. number
B. object
C. string
D. undefined
Correct Answer: A
Chapter: 77
Q865:
What is the result of typeof new Date()?
A. string
B. object
C. date
D. function
Correct Answer: B
Chapter: 77
Q866:
Fill in the blank: The typeof operator is not a _____
A. variable
B. string
C. function
D. data type
Correct Answer: A
Chapter: 77
Q867:
What is the data type of typeof myCar if myCar is not declared?
A. undefined
B. object
C. string
D. number
Correct Answer: A
Chapter: 77
Q868:
What does typeof false return?
A. boolean
B. number
C. string
D. object
Correct Answer: A
Chapter: 77
Q869:
Fill in the blank: The typeof operator returns object for _____
A. arrays
B. numbers
C. functions
D. undefined
Correct Answer: A
Chapter: 77
Q870:
What is the result of typeof {name:'John', age:34}?
A. object
B. string
C. function
D. array
Correct Answer: A
Chapter: 77
Q871:
Which method checks if an object is of type Array?
A. isArray
B. typeof
C. constructor
D. instanceof
Correct Answer: A
Chapter: 78
Q872:
What does String(123) return?
A. "123"
B. 123
C. "Number"
D. undefined
Correct Answer: A
Chapter: 78
Q873:
What is the output of Number("3.14")?
A. 3.14
B. "3.14"
C. NaN
Correct Answer: A
Chapter: 78
Q874:
What method converts a number to a string in exponential notation?
A. toFixed()
B. toString()
C. toExponential()
D. toPrecision()
Correct Answer: C
Chapter: 78
Q875:
Fill in the blank: The global method _____ can convert a boolean to a string.
A. Number()
B. String()
C. parseInt()
D. toString()
Correct Answer: B
Chapter: 78
Q876:
What is the result of Number("99 88")?
A. NaN
B. 9988
C. "99 88"
Correct Answer: A
Chapter: 78
Q877:
Fill in the blank: The method _____ converts strings to numbers but returns NaN for non-numeric strings.
A. Number()
B. parseFloat()
C. parseInt()
D. toString()
Correct Answer: A
Chapter: 78
Q878:
What is the output of Number(new Date())?
A. The date in milliseconds
B. The current date and time
C. NaN
Correct Answer: A
Chapter: 78
Q879:
What does String(true) return?
A. "true"
B. 1
C. 1
D. "boolean"
Correct Answer: A
Chapter: 78
Q880:
Fill in the blank: The _____ method returns a string representation of the number with a specified number of decimals.
A. toExponential()
B. toFixed()
C. toPrecision()
D. toString()
Correct Answer: B

Test Your Knowledge

Take a timed quiz on Fundamentals of Front End Development

🚀 Start Quiz Now