📄️ Introduction
This guide provides a comprehensive overview of the language's syntax, features, and runtime behavior. Whether you are a beginner looking to understand the fundamentals or an experienced developer diving into the specifics, this reference serves as your go-to resource.
📄️ Program Structure
Main Function Requirement
🗃️ Built-in Types
6 items
📄️ Declarations
Varjus supports variable declarations using let and const. Unlike some other languages, it does not support chaining declarations with the comma operator.
📄️ Control Flow
Control flow statements allow you to control the execution order of your code.
📄️ Functions
Functions are used to define reusable blocks of code that can be executed when called. Functions can accept parameters, perform operations, and return values.
📄️ Operators
This language supports various operators, categorized into different types based on their usage and behavior.
📄️ Comments
Comments are used to add non-executable explanations or notes within your code. This language follows the same syntax for comments as JavaScript.
📄️ Exception handling
The try-catch statement allows handling user-defined exceptions.
📄️ Modules
Modules allow you to structure your code into reusable components. They work similarly to JavaScript modules but come with stricter rules, such as only allowing exports from the global scope and treating circular dependencies as errors.
📄️ Type Coercion
Type coercion follows a strict and predictable set of rules to ensure safe and deterministic behavior. Implicit conversions occur only when moving from a lower-precision or less expressive type to a higher-precision or more expressive type, following this priority order:
📄️ Code Examples
Check out the tests section from the GitHub for practical examples.