-1
我有两个元件的阵列相匹配的值获取不与从阵列匹配元素与两个元件
var a = ['a','b'];
我具有如var remover = 'a'
我想要的结果变量作为var result = 'b'
我想它作为
var current_id = 'windows123456';
var allIds = People.Ids(); // this will have ['windows123456','windows123']
var index = allIds.indexOf(current_id);
if (index >= 0) {
allIds.splice(index, 1);
}
console.log(allIds[0]); //windows123
任何简单的方法来做到这一点?