Developer-Guide/standards/js.md
Dennis Eichhorn 44e46176ca
Some checks failed
Compress images / calibreapp/image-actions (push) Has been cancelled
CI / linting (push) Has been cancelled
fix permissions
2025-04-02 14:15:04 +00:00

23 lines
611 B
Markdown

# Js
The js code needs to be ECMAScript2021 compliant. No js ECMAScript2021 deprecated or removed elements, functions or practices are allowed. Please use the `.eslintrc` configuration for Eslint to identify most of the basic code standards.
## Browser support
Js solutions must be valid on the newest versions of Edge, Firefox, Chrome and Safari.
## Variable scope
Variables should be defined with the scope in mind. `const` and `let` are the preferred definitions.
## Deprecated functions and variables
* `eval`
## Array
Arrays should always bet initialized by using `[]`.
```js
arr = [1, 2, 3];
```