To run JavaScript code in Your Terminal first you need to install NodeJs. The next step is to open terminal and run node
command (if you don’t have NodeJs then go to NodeJs Runtime Environment Download and Download it.):
1) In Windows
2) In Linux
We can also use node
to run the JavaScript file:
1) open terminal,
2) create an empty file: touch script.js
,
3) edit file and add a simple function:
4) run script using node script.js
command,
5) the output should be 15
.
{{ 'Comments (%count%)' | trans {count:count} }}
{{ 'Comments are closed.' | trans }}