LoginSignup
1
1

More than 1 year has passed since last update.

【JavaScript】JavaScriptの複数配列のincludes

Last updated at Posted at 2022-01-19
process.stdin.resume();
process.stdin.setEncoding('utf8');
// Your code here!
var search = [1,2,3,4,5];


var data = [1,2,6,5];

search.forEach(function(element){
  console.log(data.includes(element));
});

結果

true
true
false
false
true

1
1
0

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
1
1