Closed gopichand2131 closed 1 year ago
@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.
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?