Variables can be declared in many ways. For variables declared with class,
const, or let, it is an error to use the variable before/above its
declaration:
To fix this error, move the variable's declaration up above its use:
Alternatively, declare the variable in an outer scope: