DEV Community

Discussion on: How To Efficiently Get The Last Element Of An Array In JavaScript

Collapse
 
mistval profile image
Randall

It looks good but I think you can replace const one = 69 * 420 - 69 * 419 - 34 * 2; with const one = 2 - 1; maybe. A little bit more concise.