LeekScript 3

LeekScript 3

> LeekScript

LeekScript 3 is the third version of LeekScript, released on November 30, 2021.

Object Literals

It is now possible to declare anonymous objects with the following syntax:

And to use them as a classic object:

These objects have as class the class Object and cannot have methods, except Object.keys() and Object.values(). It is possible to add fields to them on the fly:

New reserved keywords

Here are all the reserved keywords from LeekScript 3, to name a variable, a function, a class, a method, a field etc. They are not all used in the language but are in anticipation of future versions:

Reflection

The following methods and fields of reflection are added:

Base Classes

The base classes are introduced in the language:

We can therefore create values ​​with these classes:

And use instanceof: