Node command line program - REPL (read-eval-print-loop) session

Note: This post is a details-post for the post: Learning web app development through free online tutorials – Organized Notes and Log, https://raviswdev.blogspot.com/2024/03/learning-web-app-development-through.html .

node command line program creates a “REPL” session. From Read–eval–print loop, https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop, “A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.”

Executing a simple console.log statement in node command prints out the expected data but that is followed by another line having “undefined”. It seems that the return value of console.log is printed and that is undefined. Ref: node.js displays “undefined” on the console, https://stackoverflow.com/questions/8457389/node-js-displays-undefined-on-the-console 

Comments

Archive