Szerkesztés

Megosztás a következőn keresztül:


Translating to JavaScript from VBScript

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 but 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. VBScript is only supported by Internet Explorer.

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

Translating to JavaScript