Remove Array Value By index in jquery

前端 未结 5 865
别那么骄傲
别那么骄傲 2020-12-14 15:05

Array:

var arr = {\'abc\',\'def\',\'ghi\'};

I want to remove above array value \'def\' by using index.

5条回答
  •  情深已故
    2020-12-14 15:34

    Use the splice method.

    ArrayName.splice(indexValueOfArray,1);
    

    This removes 1 item from the array starting at indexValueOfArray.

提交回复
热议问题