Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Lesson 03: Running code & the REPL

Two ways to run JS: a file, or the interactive REPL.

What you'll learn

  • node file.js runs a script
  • node with no args opens the REPL (Read-Eval-Print-Loop)
  • in the REPL, _ holds the last result
  • .exit or Ctrl-D leaves the REPL

Example

See examples/.

Exercise

Open the REPL and compute the area of a circle radius 3.