Introduction to JScript 10.0 for JScript Programmers

The information presented here is mainly for programmers who are already familiar with JScript and want to learn about the new features introduced in JScript 10.0.

Common Tasks

  • How to compile programs
    The JScript 10.0 command-line compiler creates executables and assemblies from JScript programs. For more information, see How to: Compile JScript Code from the Command Line.

  • How to write a "Hello World" program
    It is easy to write the JScript 10.0 version of "Hello World". For more information, see The JScript Version of Hello World!.

  • How to use data types
    In JScript 10.0, a colon specifies the type in a variable declaration or function definition. The default type is Object, which can hold any of the other types. For more information, see JScript Variables and Constants and JScript Functions.

    JScript 10.0 has several built-in data types (such as int, long, double, String, Object, and Number). For more information, see JScript Data Types. You can also use any .NET Framework data type after importing the appropriate namespace. For more information, see .NET Framework Class Library.

  • How to access a namespace
    A namespace is accessed using either the import statement (when using the command-line compiler) or the @import directive (when using ASP.NET). For more information, see import Statement. The /autoref option (which is on by default) automatically attempts to reference the assemblies that correspond to namespaces used in a JScript .NET program. For more information, see /autoref.

  • How to create typed (native) arrays
    A typed array data type is declared by placing square brackets ([]) after the data type name. You can still use JScript array objects, objects created with the Array constructor. For more information, see Arrays Overview.

  • How to create a class
    In JScript 10.0, you can define your own classes. Classes can include methods, fields, properties, static initializers, and sub-classes. You can write a completely new class, or you can inherit from an existing class or interface. Modifiers control the visibility of the class members, how members are inherited, and the overall behavior of a class. Custom attributes can also be used. For more information, see Class-based Objects and JScript Modifiers.

See Also

Concepts

Upgrading Applications Created in Previous Versions of JScript

Other Resources

Getting Started with JScript