1. Introduction

JS++ is an easy-to-learn and powerful programming language designed for high-quality web and mobile development. This tutorial is aimed at beginners.

JS++ is a compiled programming language. This means JS++ code is run through a compiler which translates the JS++ code into code your target platform can understand (such as JavaScript). Thus, JS++ can run anywhere JavaScript can be run: on the web, on the server, on mobile devices, etc. During the compilation process, error checking and other analysis is performed on the source code. The JS++ compiler will check the correctness of your code and raise errors (if any) at compile time. This allows you to become aware of errors and fix them immediately. (Note that logical errors will not be caught by the compiler. For example, if you intended to add 1 + 1 but made a typo and added 1 + 2 instead, the compiler will not catch this.)

In contrast, errors in regular JavaScript cannot be found until you run your code and produce the exact conditions that could generate an error. Therefore, it can be very difficult to write robust and reliable applications. Another advantage of a compiler is that the most efficient code will be generated for all target platforms automatically.

This tutorial will introduce you to JS++ and help you write your first programs. You will begin with the most basic "Hello World" program, which is typically the first program you'll learn to write in JS++, and progress to introductory "Hello World" applications with popular libraries and tools such as jQuery and Node.js.

1.1. History of JS++

JS++ was first released in October 2011 as the first JavaScript superset programming language. The language has been refined over four years until it was re-released in 2015.

JS++ grew as a superset of JavaScript; that is, any valid JavaScript code would also be valid JS++ code. Much like Bjarne Stroustrup extended the C programming language to create C++ as object-oriented programming was catching on, JS++ extended the JavaScript language to include, among other features, object-oriented programming via classes.

However, in practice, JS++ and JavaScript are very different. The syntax of JS++ is inspired by C++, C#, and Java with hints of Python and other languages.

One of the advantages of JS++ over other languages is that its type system is "sound." All programs contain data, and all data can be classified by its "data type." In JS++, whether you declare an unsigned int or Employee, your declared type will never be wrong and become a function, string, etc. Types are never "erased" in JS++; they are always correct. Isn't that what a true software engineer would demand from his programming language? Who would want to declare thousands of types only for them to be incorrect every tenth run? JS++ was refined over and over to deal with the hundreds of nuances of the JavaScript language until they all worked together in harmony.