Node. js REPL (Interactive interpreter) instance details, node. jsrepl

Source: Internet
Author: User

Node. js REPL (Interactive interpreter) instance details, node. jsrepl

Node. js REPL (Interactive Interpreter)

Node. js REPL (Read Eval Print Loop: Interactive interpreter) indicates a computer environment. Similar to the terminal of the Window system, we can enter commands in the terminal and receive system responses.

Node comes with an interactive interpreter that can execute the following tasks:

  • Read-read user input, parse the input Javascript data structure, and store it in memory.
  • Execute-execute the input data structure
  • Print-output result
  • Loop-perform the preceding steps until you press ctrl-c twice to exit.

Multi-line expression

Underscore (_) Variable

You can use the underscore (_) to obtain the operation result of the expression:

REPL command

  • Ctrl + c-exit the current terminal.
  • Ctrl + c press twice-exit Node REPL.
  • Ctrl + d-exit Node REPL.
  • Up/down key-view input History commands
  • Tab key-list the current command
  • . Help-LIST commands used
  • . Break-exit multi-line expression
  • . Clear-exit multi-line expression
  • . Save filename-save the current Node REPL session to the specified file
  • . Load filename-load the file content of the current Node REPL session.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.