How do you set up your JScript (NOT JScript.NET) development environment?

Posted by jJack on Stack Overflow See other posts from Stack Overflow or by jJack
Published on 2010-03-24T01:50:42Z Indexed on 2010/03/24 1:53 UTC
Read the original article Hit count: 257

Filed under:
|

In my environment, if I create a class in JScript syntax:

class test{

}

and then save it to a file named "test.js" and run it with wscript, I get a Microsoft JScript "Syntax error" at line 1.

However, if I simply, say, write a function:

  function getInput() {

   var wshell = WScript.CreateObject("WScript.Shell");
   wshell.Popup ("Do you want to continue?");

   return userInput
}

getInput()

and run it the same way, it works.

Hopefully, there is something fundamentally wrong with my class definition. If that is the case, I am excited to find out.

© Stack Overflow or respective owner

Related posts about jscript

Related posts about compiler-errors