DEV Community

Discussion on: Ultimate Cheatsheet Compilation

Collapse
 
wolobi profile image
wolobi • Edited

Congratulations. I love these Cheatsheets, but at point 4.

city[3];//'y'
Should be
city[3];//'p'
right?

regards

Collapse
 
palashmon profile image
Palash Mondal • Edited

Glad you found it helpful 😊

And yes, that is a typo in there. The output would be p, as Array indexes start with 0.
So, [0] is the first element. [1] is the second element.