Expressions vs Statements

Expressions produce a value and the value then is slotted into statements. Brackets evaluate an expression and allow to access the property dynamically.
Example:
id = 23
object[id] would be equal to object[23]
while
object.id is equal to object[“id”]

Source: https://www.joshwcomeau.com/javascript/statements-vs-expressions/