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: 87
Q981:
What JavaScript keyword is used to declare read-only variables in some engines but is not part of ES3 or ES5?
A. var
B. let
C. const
D. this
Correct Answer: C
Chapter: 87
Q982:
Fill in the blank: To avoid compatibility issues, you should avoid using _____ names in JavaScript.
A. Java objects
B. HTML properties
C. reserved words
D. nonstandard keywords
Correct Answer: C
Chapter: 88
Q983:
What does Infinity represent in JavaScript?
A. Positive/negative infinity
B. A specific number
C. NaN
D. Undefined
Correct Answer: A
Chapter: 88
Q984:
Fill in the blank: The property that indicates a value is not a legal number in JavaScript is called _____.
A. Infinity
B. NaN
C. undefined
D. eval
Correct Answer: B
Chapter: 88
Q985:
What does undefined indicate in JavaScript?
A. A variable has not been assigned a value
B. A value is not a legal number
C. Positive/negative infinity
D. The result of an eval() call
Correct Answer: A
Chapter: 88
Q986:
Fill in the blank: The JavaScript function that evaluates and executes a string as code is _____.
A. eval
B. NaN
C. Infinity
D. undefined
Correct Answer: A
Chapter: 88
Q987:
What will eval("2 + 2") return?
A. 2
B. 4
C. 6
D. NaN
Correct Answer: B
Chapter: 88
Q988:
Fill in the blank: eval("x * y") will return _____ if x is 10 and y is 20.
A. 10
B. 20
C. 200
D. NaN
Correct Answer: C
Chapter: 88
Q989:
Which of the following values indicates that a variable has not been assigned a value?
A. NaN
B. Infinity
C. undefined
D. eval
Correct Answer: C
Chapter: 88
Q990:
Fill in the blank: The function eval("x + 17") will return _____ if x is 10.
A. 10
B. 17
C. 27
D. NaN
Correct Answer: C
Chapter: 88
Q991:
What is the output of eval("x + 17") if x is 10?
A. 10
B. 17
C. 27
D. NaN
Correct Answer: C
Chapter: 88
Q992:
Fill in the blank: The JavaScript property that represents positive/negative infinity is _____.
A. NaN
B. undefined
C. Infinity
D. eval
Correct Answer: C
Chapter: 89
Q993:
What does the window.open() method do?
A. Closes the current window
B. Opens a new window
C. Moves the current window
D. Resizes the current window
Correct Answer: B
Chapter: 89
Q994:
Fill in the blank: The setTimeout() method calls a function or evaluates an expression after a specified number of _____.
A. seconds
B. milliseconds
C. minutes
D. hours
Correct Answer: B
Chapter: 89
Q995:
What is the purpose of the clearTimeout() method?
A. To open a new window
B. To resize the current window
C. To clear a timer set with setTimeout()
D. To scroll the window
Correct Answer: C
Chapter: 89
Q996:
What does the window.close() method do?
A. Closes the current window
B. Opens a new window
C. Moves the current window
D. Resizes the current window
Correct Answer: A
Chapter: 89
Q997:
Fill in the blank: The setInterval() method calls a function or evaluates an expression at specified _____.
A. times
B. distances
C. intervals
D. volumes
Correct Answer: C
Chapter: 89
Q998:
What is the correct syntax to call a function every 3000 milliseconds using setInterval()?
A. setInterval(myFunc, 3000);
B. setTimeout(myFunc, 3000);
C. window.setInterval(myFunc, 3000);
D. window.setTimeout(myFunc, 3000);
Correct Answer: A
Chapter: 89
Q999:
Fill in the blank: The ID value returned by setInterval() is used as the parameter for the _____.
A. setTimeout() method
B. clearTimeout() method
C. window.open() method
D. window.close() method
Correct Answer: B
Chapter: 89
Q1000:
What is the purpose of the window.scrollBy() method?
A. To scroll to a specific position
B. To resize the window
C. To scroll by a certain number of pixels
D. To close the window
Correct Answer: C

Test Your Knowledge

Take a timed quiz on Fundamentals of Front End Development

🚀 Start Quiz Now