Variable Declaration

Verze:

31. 12. 2025

Zodpovědná osoba:

Dominik Šlechta

Variables MUST be declared using const or let. The var keyword MUST NOT be used. Use const for variables that are never reassigned.

Variables MUST be declared using const or let.

The var keyword MUST NOT be used.

Variables that are never reassigned MUST be declared with const.

Variables that are reassigned MUST be declared with let.

Example (Correct):

const productList = []
const isLoading = false
let currentPage = 1
currentPage = 2

Example (Incorrect):

var productList = []
let isLoading = false // should be const if never reassigned