how to use system cmd in javascript

hii firstly open terminal and install shelljs 

$ npm install shelljs
$ touch file.js
$ nano file.js

and type code in file.js


var shell = require('shelljs');
shell.echo('hello world');


and save and run the file on terminal

$ node file.js






Comments

Popular posts from this blog