LoginSignup
0
0

【JavaScript】【Jquery】配列の指定した要素を削る

Last updated at Posted at 2023-07-21

コード

process.stdin.resume();
process.stdin.setEncoding('utf8');

var aaa = [1,2,3].filter(function(v){
    return ! [2].includes(v);
});
console.log(aaa);

var aaa = [1,2,3].filter((v) => ![2].includes(v));  
console.log(aaa);


結果

[ 1, 3 ]
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0