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: 64
Q741:
Fill in the blank: Math.SQRT1_2 returns ________.
A. The square root of 2
B. The square root of 1/2
C. The square root of 10
D. The square root of 100
Correct Answer: B
Chapter: 64
Q742:
Which method is used to find the lowest value from a list of arguments?
A. Math.min()
B. Math.max()
C. Math.round()
D. Math.random()
Correct Answer: A
Chapter: 64
Q743:
Fill in the blank: Math.E returns ________.
A. Euler's number
B. PI
C. The square root of 2
D. The square root of 1/2
Correct Answer: A
Chapter: 64
Q744:
What does the Math.max() method return?
A. The lowest value from a list
B. The highest value from a list
C. A random number
D. The rounded value
Correct Answer: B
Chapter: 64
Q745:
Fill in the blank: Math.SQRT2 returns ________.
A. The square root of 10
B. The square root of 2
C. Euler's number
D. The natural logarithm of 2
Correct Answer: B
Chapter: 65
Q746:
What is the default constructor for creating a new Date object in JavaScript?
A. new Date()
B. new Date(milliseconds)
C. new Date(dateString)
D. new Date(year, month, day, hours, minutes, seconds, milliseconds)
Correct Answer: A
Chapter: 65
Q747:
Fill in the blank: new Date(86400000) creates a date object representing ________.
A. January 1, 1970, 00:00:00 UTC
B. One day after January 1, 1970
C. January 1, 1971, 00:00:00 UTC
D. January 1, 1970, 00:00:00 GMT
Correct Answer: B
Chapter: 65
Q748:
What method converts a date object to a UTC string?
A. toString()
B. toDateString()
C. toUTCString()
D. toISOString()
Correct Answer: C
Chapter: 65
Q749:
Fill in the blank: d.toDateString() returns the date in a ________ format.
A. ISO
B. Long
C. Short
D. Readable
Correct Answer: B
Chapter: 65
Q750:
Which format is preferred for JavaScript dates according to the ISO 8601 standard?
A. Short date
B. Long date
C. ISO date
D. Custom date
Correct Answer: C
Chapter: 65
Q751:
Fill in the blank: The method getDay() returns the ________.
A. Day of the month
B. Weekday as a number (0-6)
C. Day of the year
D. Weekday as a string
Correct Answer: B
Chapter: 65
Q752:
What method would you use to get the full year from a Date object?
A. getDate()
B. getMonth()
C. getFullYear()
D. getHours()
Correct Answer: C
Chapter: 65
Q753:
Fill in the blank: new Date("2015-03-25T12:00:00") uses the format ________.
A. ISO
B. Long
C. Short
D. Custom
Correct Answer: A
Chapter: 65
Q754:
What does the getHours() method return?
A. Hours in 24-hour format
B. Hours in 12-hour format
C. Minutes in 24-hour format
D. Seconds in 24-hour format
Correct Answer: A
Chapter: 65
Q755:
Fill in the blank: new Date("03/25/2015") uses the ________ date format.
A. ISO
B. Long
C. Short
D. Custom
Correct Answer: C
Chapter: 65
Q756:
Which method is used to get the day of the month from a Date object?
A. getDay()
B. getDate()
C. getFullYear()
D. getMinutes()
Correct Answer: B
Chapter: 66
Q757:
Which method sets the day of the month for a Date object?
A. setDate()
B. setFullYear()
C. setHours()
D. setMilliseconds()
Correct Answer: A
Chapter: 66
Q758:
Fill in the blank: d.setDate(d.getDate() + 4) adds ________ days to the current date.
A. 2
B. 3
C. 4
D. 5
Correct Answer: C
Chapter: 66
Q759:
What does Date.parse("March 21, 2012") return?
A. Number of milliseconds since January 1, 1970
B. The date as a string
C. A Date object
D. The number of days since January 1, 1970
Correct Answer: A
Chapter: 66
Q760:
Fill in the blank: d.setHours(10) sets the hour of a Date object to ________.
A. 0.41666666666667
B. 0.91666666666667
C. 10 in the morning
D. 10 in the evening
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Fundamentals of Front End Development

🚀 Start Quiz Now