const repl = require("repl");const myVariable = 1;console.log("myVariable: ", myVariable);// provide extra contexts here to access in the REPLrepl.start().context.myVariable = myVariable; 请注意,默认情况下,REPL中只能访问全局变量。如果要访问其他变量,必须通过context传递它们 repl.start().co...