0
What does this [0] do at end of splice function
Const arr = fruits.splice(fromindex,1)[0] , fruits is a array with 5 objects
4 Respostas
+ 2
It's deleting fruits[fromindex] and storing it in arr constant.
+ 1
[0] is used to get the first element of the array.
0
So what it is doing with splice suppose array is [nikhil,joy,jay,ram,alice] so what will the above function do
0
Ohkk