// Modules and Comprehensive Standard Library
import System;
import Externals.DOM;

// Import all your favorite JavaScript libraries in just one line
external jQuery, $, Backbone, require;

// Nearly no learning curve
// You can keep writing regular JavaScript if you want
var x = 0, y = Math.floor(1.1);

// The only type system in the industry that is optional and "sound".
// In other words, if you choose to declare the type for a variable, it
// is guaranteed to always be correct - at compile time and runtime.

int counter = 0;    // This will always remain an 'int' - even at runtime
unsigned int x = 0; // This will always remain an 'unsigned int' - even at runtime
Employee e = new Employee();  // This will always remain an 'Employee' - even at runtime

byte[] rgbColors = [ 0xFF, 0xFA, 0xFF ];
string hello = String.format("Hello, {name}!", name);
bool test = "oops"; // The compiler catches this error for you

// Namespaces, classes, interfaces, and more included
module MyApplication
{
    class Employee
    {
        private string firstName = "John";
        private string lastName = "Smith";

        public void talk(string message)
        {
            // 100% compatible with regular JavaScript out of the box
            // Keep using all your favorite JavaScript libraries
            jQuery("#msgbox").text(message);
            $("#msgbox").show();
        }
    }
}

Beyond Type Checking: Type Guarantees

Select your platform:

By downloading JS++, you agree to the End User License Agreement (EULA)

You are downloading an EARLY ACCESS PREVIEW of the JS++™ compiler. Several features are either incomplete or unimplemented, and you may encounter bugs.