21 May 2026
cmd+k v.node on your terminal.
.load 1.js and you can get value of any variable’s value in the REPL mode by using the name of variable. Example: // Source: https://chatgpt.com/c/6a0f14b7-0098-83ec-962f-c95fb32c609e
/* Note: Please add below 4 lines of code to your ~/.bashrc file.
# Run a file in REPL mode and you can access top level variables and functions in REPLY. ❤️
node.run_in_repl() {
node -i -e "$(cat $1)"
}
*/
let cars = ['bmw', 'mercedes'];
const bikes = ['ducati', 'splender'];
let count = 0;
setInterval(() => {
// You get this log in REPL
console.log('Ran interval function');
// 🎉 You can run `count` in REPL and you get its latest value always.
count++;
}, 2000);