Variable Types
Variable Types
When you are declaring a new variable, you may optionally declare its type.
JavaScript has three ways of declaring local variables:
-
var
- declares a variable, optionally assigning a value. (MDN) -
let
- declares a block-scoped variable, optionally assigning a value. (MDN) -
const
- declares a block-scoped variable, assigning a value that cannot be re-assigned. (MDN)
In Flow these fall into two groups:
-
let
andvar
-