Ways to run javascript on your computer – Code Example

Total
0
Shares

In this article we will see how you can run javascript on your computer system. We will discuss about 2 ways to run Javascript –

  1. Using Google Chrome Developer Console.
  2. Node.js client

Code Example –

1. Using Google Chrome Developer Console –

// Open Google Chrome Browser
// Press ctrl + shift + j on windows (ctrl + option + j) on Macos
// This will open console window. You may write your javascript here

Date.now()

// Output will be EPOCH milliseconds
// 1659437118393

2. Using Node.js –

// Install node.js from https://nodejs.org/en/download/
// Open node console from installed software

Date.now()

// Output will be EPOCH milliseconds
// 1659437118393

Download Link – Node