Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The trendy kids favor the first way, nowadays, with the empty square brackets, but if you have really cool ring tones on your phone, you can probably still get away with the latter syntax.

So, why const?

For arrays, do not declare using var, since that can be mutated into another datatype. Use const instead. The third flavor, let, allows the datatype to be changed, which you probably don’t want to do with an array.

...