MCQs > IT & Programming > JavaScript > Correct method for getting the date of February 1 of the current year into a variable called 'newDate'?

JavaScript MCQs

Which of the following is the correct method for getting the date of February 1 of the current year into a variable called "newDate"?

Answer

Correct Answer: var d = new Date();<br>newDate=new Date(d.getFullYear(), 1, 1);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it