Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
vringar16198y@iam13islucky so any null value at the end of an array is just cut? That would mess with me so hard when trying to output a table with two for eachs.
Thanks for reminding me why I am not a js Dev. -
[1,2].concat(new Array(1)) . Problem solved. You're welcome. Stop complaining and learn.
-
Also, if you want [1,2] + 1 more null value, you'd write [1,2,,] becacuse of a JS quirk where trailing "," are cut from parts of the code (not just in this example). As I said, you'll learn by doing, not my complaining.
TIL that in JavaScript [1, 2, ] gives you a 2 elements array, while [, 1, 2] gives you a 3 elements array
WTF JavaScript???
undefined
javascript what???