For instance, if you were to run a Python script you would type python filename.py or if you wanted to run a C program make filename then ./ filename. How do you do this with .js files?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
If you are on a Windows PC, you can use WScript.exe or CScript.exe
Just keep in mind that you are not in a browser environment, so stuff like
document.write
or anything that relies on thewindow
object will not work, likewindow.alert
. Instead, you can callWScript.Echo
to output stuff to the prompt.http://msdn.microsoft.com/en-us/library/9bbdkx3k(VS.85).aspx