NodeJs Getting Started

type node in shell, and repl(read, eval, print, loop) will be opened. ctrl + l to clear repl

to type multine or multiple function type .editor.

.help

.break

to save the histroy of repl type .save fileName.js

type more fileName.js to view the content of file that you saved.

to load the previously saved functions inside the repl type .load fileName.js

Use of auto complete function

Press single tap to autocomplete the functions name. Press double tap to discover all the methods available to that object. For Example Type Array. and do double tap it will list all the mehtods available for array. For object type

type . and press double tab if you enter (space) and press double everything that is available at gloabal level will apear.

_ (underscore) it stores the result of last expression.

const random = _

Previous
Next