The Date() method returns today's date and time.
Syntax: Date()
Example
In this example we will print today's date and time:
Thu Jul 27 2017 23:23:42 GMT+0530 (India Standard Time)
Final code and demo is here
Demo
Syntax: Date()
Example
In this example we will print today's date and time:
<script type="text/javascript">The output of the code above will be:
document.write(Date())
</script>
Thu Jul 27 2017 23:23:42 GMT+0530 (India Standard Time)
Final code and demo is here
Demo
No comments:
Post a Comment