JavaScript is weird. blocks.length = 4 █ █ █ █ 1 2 3 4 index: █ █ █ █ 0 1 2 3 slice(0, 3) █ █ █ 1 2 3


I hate doing blocks.length - 1 to get the correct index 😡 and slice doesn't make any sense. JavaScript is weird indeed


Hmmm, sorry but... what's weird here? I do not see any issue.


I always think of the second digit as a stopping index. It won't be included in the sliced data.


It's not weird ,same happens in Python


United States الاتجاهات
Loading...

Something went wrong.


Something went wrong.