LeekScript 3

LeekScript 3

> LeekScript

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

Object literals

You can now declare anonymous objects with the following syntax:

And use them like a regular object:

These objects belong to the Object class and cannot have methods, apart from Object.keys() and Object.values(). You can add fields to them on the fly:

New reserved keywords

Here are all the keywords reserved from LeekScript 3 onward, which cannot be used to name a variable, a function, a class, a method, a field, etc. Not all of them are used in the language yet: some are set aside for future versions:

Reflection

The following reflection methods and fields are added:

Base classes

Base classes are introduced into the language:

So you can create values with these classes:

And use instanceof: