To run the code , implement the following steps:
-
Open chrome browser
-
Open a new tab.
-
Do right click, and select inspect.
-
Then , go to Sources tab
-
Click on Snippets
-
Paste your code
-
Finally , Enter Ctrl+Enter key to run your code.
-
See your output by clicking on console tab.
OR -
Simply, Go to this website: https://onecompiler.com/javascript
-
Paste the code.
-
Run it.