JavaScript basics
Variables, functions, conditions, arrays, and readable behavior patterns.
What you will practice
Constants; Mutable values; Readable strings; Number calculations.
Use the worked examples when needed, then test your understanding without them.
- 01JavaScript basics: Constantsconst prevents reassignment of a binding. It does not deeply freeze an object stored in that binding.Practice
- 02JavaScript basics: Mutable valueslet allows a value to change; choose it when reassignment is part of the task.Practice
- 03JavaScript basics: Readable stringsStrings represent text; quotes delimit the value, while concatenation combines text without changing its meaning.Practice
- 04JavaScript basics: Number calculationsArithmetic operates on numbers. Converting units explicitly keeps an otherwise correct expression from answering the wrong question.Practice
- 05JavaScript basics: Boolean decisionsComparisons produce booleans. Strict equality avoids implicit conversion when checking a known type.Practice
- 06JavaScript basics: Conditional branchesAn if statement chooses a path from a condition; the else branch handles the other case.Practice
- 07JavaScript basics: ArraysArrays hold ordered values. Index zero refers to the first item.Practice
- 08JavaScript basics: Array lengthlength counts the array slots; the last valid index is normally length minus one.Practice
- 09JavaScript basics: Named functionsA named function groups a reusable operation; calling it runs its body.Practice
- 10JavaScript basics: Function parametersParameters let the same function work with different inputs without duplicating its body.Practice
- 11JavaScript basics: Return valuesreturn supplies a result to the caller. A function without an executed return yields undefined.Practice
- 12JavaScript basics: Template stringsBacktick template strings can interpolate expressions with ${...}; ordinary quoted strings do not interpolate them.Practice