EsJS Documentation

website·Indexed 30 days ago

https://es.js.org/

Documentation for EsJS, a language featuring Spanish-language syntax and a comprehensive ecosystem. It covers core concepts including data types (Cadena, Numero, Matriz), flow control (si...sino, mientras, para), functions, and operators, as well as integrations with Express, Hono, Knex, and MySQL, and utility packages like @es-js/tiza and @es-js/terminal.

Tokens
29.8K
Snippets
206
Records
249
Agent score
64%

What's inside EsJS

  1. Overview of EsJS and its relationship to JavaScript

    EsJS is a programming language designed to help Spanish speakers learn programming by using Spanish tokens instead of English. It shares the same grammar as JavaScript. EsJS code is transpiled into equivalent JavaScript code, meaning it can be executed anywhere JavaScript is supported and offers virtually the same capabilities and functionality.
  2. Overview of @es-js/terminal

    The @es-js/terminal package provides a command-line component that allows developers to interact with the user via a terminal interface.
  3. Overview of EsJS Spanish Syntax Language

    EsJS is a programming language that provides a Spanish-language syntax for JavaScript. It is designed to be accessible for Spanish speakers while maintaining the full power of the JavaScript ecosystem. Because it converts to JavaScript, it can be used in both client-side (browser) and server-side environments and is compatible with all existing JavaScript libraries and frameworks.
  4. EsJS Module System Overview

    A module in EsJS is a namespace containing variables, constants, functions, and classes. Every file is treated as an individual module, allowing for a structured organization of code through importing and exporting.
  5. Understand the Symbol data type

    A Symbol is a primitive data type used to represent a unique name or identifier. Symbols are immutable and guaranteed to be unique; every time a new Symbol is created, it is distinct from any other Symbol, and its name cannot be changed after creation.
  6. Understand EsJS basic syntax and grammar

    EsJS syntax is a direct translation of JavaScript into Spanish. It is case-sensitive and supports Unicode characters (e.g., 'Año' is a valid variable name). Statements are terminated by semicolons (;). While semicolons are optional if a statement is on its own line, they are recommended as a best practice to prevent errors.
  7. Work with dates using the Fecha object

    EsJS uses the Fecha object to handle dates and times, storing them as the number of milliseconds since January 1, 1970, 00:00:00 UTC. The valid range is -100,000,000 to 100,000,000 days relative to the epoch. Note that Fecha has methods but no properties.
    mut nombreFecha = crear Fecha([parametros]);
  8. Understand number representation in EsJS

    EsJS implements numbers using the IEEE 754 64-bit double-precision floating-point format. This allows for a range between approximately ±10⁻³⁰⁸ and ±10⁺³⁰⁸, with 53 bits of numerical precision. Integers up to ±2⁵³ - 1 are represented exactly. The numero type also includes symbolic values: +Infinito (Positive Infinity), -Infinito (Negative Infinity), and NeN (Not-a-Number).
  9. Use the Number data type in esjs

    The Numero data type represents numeric values, which can be integers or decimals, and can be positive or negative.
    mut x = 1;
    mut y = 1.5;
    mut z = -1;
  10. Format terminal text with @es-js/tiza

    The @es-js/tiza package provides functions to apply styles and colors to terminal text. These functions can be combined to achieve complex formatting. Common formatting styles include bold, dim, italic, underline, strikethrough, and inverted colors.
  11. Understand bitwise operator behavior in EsJS

    Bitwise operators treat operands as 32-bit binary sequences (zeros and ones) rather than decimal, hexadecimal, or octal numbers. While the operation is performed on the binary representation, the resulting value is returned as a standard EsJS numeric value.
  12. Define and use Objects in esjs

    An object is a collection of properties, where each property is an association between a name (key) and a value. If a property value is a function, it is referred to as a method of the object.
    mut miObjeto = {
        propiedad: 'valor',
        metodo() {
            consola.escribir('Hola mundo');
        }
    };