lukehaas/RunJS

Splice function misbehaving

Closed this issue · 2 comments

@gopichand2131 this is correct.
The return value for splice is an array containing deleted elements. You are not deleting any elements so the returned array is empty.

Screenshot 2023-08-21 at 09 57 42

Please take a look here for more detail on splice:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice

@gopichand2131 is it clear why the returned value is an empty array?