Muokkaa

Jaa


Translating to VBScript from JavaScript

In JavaScript, there are several data types, such as numbers, strings, Booleans, objects, and the null attribute. VBScript only uses one data type, Variant, which can be subtyped to represent strings, numbers, Booleans, and so on.

In JavaScript, arrays can be expanded dynamically by setting a new value for the array's length property. In VBScript, arrays cannot be enlarged; they must be redimensioned using the redim statement.

Both VBScript and JavaScript support functions. VBScript, however, also supports subroutines. Subroutines are similar to functions, except they do not return a value.

JavaScript is case-sensitive. VBScript is not.

JavaScript is supported by a wide variety of Web browsers, including both Internet Explorer and Netscape Navigator. Netscape Navigator does not support VBScript.

VBScript supports error handling through its Err object. JavaScript does not currently provide a means of trapping and handling errors.

Translating to VBScript