A code block immediately follows a modifier inside a class. JScript modifiers can only be applied to class members. Two likely scenarios might produce this result:
-
You meant to define a class initializer but left out the class name.
-
You meant to define a method or property accessor but left out the function, function get, or function set statement.
To correct this error
-
If you meant to define a class initializer, use the correct syntax for static statement.
-
If you meant to define a method or property accessor, use the correct syntax for the function, function get, or function set statement.
See Also
Reference
static Statementfunction Statement
function get Statement
function set Statement
Concepts
JScript Modifiers