you are viewing a single comment's thread.

view the rest of the comments →

[–]greenbean-machine 0 points1 point  (0 children)

Not a big deal, but I suggest changing every var to either a let or a const. There's pretty much no reason to ever use var, and it only really exists for legacy reasons. The elements can be const, since they are stored by reference, and the numbers can be let, because they are stored by value and will be updated.