Developer-Guide/standards/js.md

611 B
Executable File

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 [].

arr = [1, 2, 3];