The const
makes perfect sense here:
- It documents that the
objectreference is not going to change. - It has block scope (same as
let
) which also makes sense.
Other than that it comes down to personal preference (using var
, let
or const
)
The const
makes perfect sense here:
let
) which also makes sense.Other than that it comes down to personal preference (using var
, let
or const
)