Message from JavaScript discussions

September 2017

— While now it's push and pop?


Although I never use push personally, and I would not use shift either. Instead I leave the array in a sparse state and reassign keys, or keep a cursor location updated

— Yes more or less

— Shift is slower I believe

— Agreed

— It is not good to change Array size a lot, so having undefined indexes is better

— Huh, makes sense

— Instead I would simply have a cursor increment every traversal, moving down the array as it's value increases

Message permanent page

— Would double as a "total nodes traversed" number too

— It all lives in the heap anyways

— Seems like a good way

— I need help writing this btw