Boolean Variables

Verze:

31. 12. 2025

Zodpovědná osoba:

Dominik Šlechta

Boolean variable names SHOULD be prefixed with is, has, can, should, or similar prefixes for clarity.

Boolean variable names SHOULD be prefixed with is, has, can, should, or similar.

Example (Correct):

const isActive = true
const hasItems = false
const canEdit = true
const shouldRefresh = false

Example (Incorrect):

const active = true
const items = false
const edit = true