How to get a timestamp in JavaScript

Below are the ways to get a timestamp in Javascript. returns the UTC timestamp in milliseconds.

If you are using IE you can use the below code.

if (! { = function now() {
        return new Date().getTime();
To convert the timestamp in seconds use below code

Math.floor( / 1000)

jQuery Tutorial for Beginners - Hello World Example

Below is a Jquery example of how to print "Hello World" to the Console.

<title>jQuery Example in Developersarena</title>
<script type="text/javascript" 
<script type="text/javascript">
      document.write("Hello, World!");