0
只是在我的驱动器的一个简单的.js文件,其中包含代码如何在PowerShell中处理错误'console is undefined'?
var x=3;
function numSqaure(x)
{
return(x*x);
}
var sentence="The square of" + x + "is" + numSqaure(x);
console.log(sentence);
我试图通过PowerShell来运行它,但它显示了一个错误“控制台”未定义。
如何处理这个错误?我只需要通过Powershell。
请检查这个问题的一些想法:http://stackoverflow.com/questions/3326650/console-is-undefined-error-for-internet-explorer – Bassie
它说*'窗口'是未定义的* – rashmi1705
你是什么意思是“通过PowerShell运行”? –