|
INTERVIEW QUESTIONS
WEB
JAVA SCRIPT
DETAILS
Question: What's the Date object using JavaScript?
Answer: Time inside a date object is stored as milliseconds since Jan 1, 1970 in JavaScript.
e.g. new Date(06,01,02) // produces "Fri Feb 02 1906 00:00:00 GMT-0600 (Central Standard Time)" new Date(06,01,02).toLocaleString() // produces "Friday, February 02, 1906 00:00:00" new Date(06,01,02) - new Date(06,01,01) // produces "86400000"
|
|
|
Category |
Java Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8850 users |
Added on |
9/22/2014 |
Views |
71657 |
Rate it! |
|
|
Question:
What's the Date object using JavaScript?
Answer:
Time inside a date object is stored as milliseconds since Jan 1, 1970 in JavaScript.
e.g. new Date(06,01,02) // produces "Fri Feb 02 1906 00:00:00 GMT-0600 (Central Standard Time)" new Date(06,01,02).toLocaleString() // produces "Friday, February 02, 1906 00:00:00" new Date(06,01,02) - new Date(06,01,01) // produces "86400000" Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What's Math Constants and Functions using JavaScript?
|
View Answer
|
|
How to test for bad numbers using JavaScript?
|
View Answer
|
|
How to convert numbers to strings using JavaScript?
|
View Answer
|
|
How to convert a string to a number using JavaScript?
|
View Answer
|
|
How to force a page to go to another page using JavaScript?
|
View Answer
|
|
How to reload the current page?
|
View Answer
|
|
How to set the cursor to wait?
|
View Answer
|
|
How to make elements invisible?
|
View Answer
|
|
How to change style on an element?
|
View Answer
|
|
How to remove the event listener?
|
View Answer
|
|
How to Handle Event Handlers?
|
View Answer
|
|
How to getting values from cookies to set widgets?
|
View Answer
|
|
How to setting a cookie with the contents of a textbox?
|
View Answer
|
|
How to open a window with no toolbar, but with the location object?
|
View Answer
|
|
How to create an input box?
|
View Answer
|
|
How to create a confirmation box?
|
View Answer
|
|
How to create a popup warning box?
|
View Answer
|
|
Explain unescape() and escape() in JavaScript?
|
View Answer
|
|
How to have the status line update when the mouse goes over a link (The support of the status line is sporadic)?
|
View Answer
|
|
How to have an element invoke a JavaScript on selection, instead of going to a new URL?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Java Script Interview Questions & Answers - Exam Mode /
Learning Mode
|