可能将这个标题命名得不好,会尝试并更好地解释一下。使用JS函数来使用另一个的语法? node.js
基本上我一直试图做一个函数:
var readlineSync = require('readline-sync');
function i(context) {
readlineSync.question(context)
}
var Username = i("Testing the prompt: ")
console.log(Username)
我觉得有写readlineSync.question
一遍又一遍,而有刺激性,但在运行代码返回此:
Testing the prompt: Hello
undefined
上午我做错了什么?
你知道写是不是拼写赖特? – thatOneGuy
不是吗?它的正确... – Tom
是的,我犯了一个错字。我的错。编辑之前。 – Tom