Browser hacking: Let's implement JavaScript arrays!

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Setting the array length property in JS is actually an interesting thing. If you set it to a value above the actual length, in some implementations it will do nothing, and in others it will create "non-iterable" empty slots. If you set it to a value lower than the actual length, then it will truncate the array and allow the elements in indices above the new length to be garbage collected.

Swirlstudios
Автор

As someone who's trying to write a transpiler, this is super helpful. Thank you

MrHarry
Автор

6:50 You also have to consume the optional last comma like [ 1, 2, 3, ] is still valid.

SlyEcho
Автор

That's a cool wallpaper. Where'd you get it?

JustSomeAussie
join shbcf.ru