官术网_书友最值得收藏!

Removing values from lists

If you know the index of the list value that you want to remove, you can pass the index to the remove() method to create a new list without the removed value, as follows:

const myList = List.of(1, 2, 3);
const myChangedList = myList.remove(0);

console.log('myList', myList.toJS());
// -> myList [ 1, 2, 3 ]
console.log('myChangedList', myChangedList.toJS());
// -> myChangedList [ 2, 3 ]

You can see here that myChangedList results from calling remove(0). It's a new list, without the first value.

主站蜘蛛池模板: 神池县| 宝清县| 德昌县| 兴城市| 涿鹿县| 察哈| 五台县| 北川| 甘肃省| 泾川县| 平乡县| 长治市| 开远市| 资源县| 安西县| 九江市| 顺义区| 潞西市| 灵璧县| 育儿| 延吉市| 双鸭山市| 甘孜| 安溪县| 四子王旗| 建瓯市| 澄江县| 香河县| 托克托县| 田林县| 麟游县| 从化市| 进贤县| 六盘水市| 烟台市| 金门县| 古蔺县| 镇安县| 丹江口市| 松滋市| 海淀区|