Answers for "check if value in array is between the values in two other arrays at same location"

0

javascript find matching elements in two arrays

let firstArray = ["One", "Two", "Three", "Four", "Five"];
let secondArray = ["Three", "Four"];

let map = {};
firstArray.forEach(i => map[i] = false);
secondArray.forEach(i => map[i] === false && (map[i] = true));
let jsonArray = Object.keys(map).map(k => ({ name: k, matched: map[k] }));
Posted by: Guest on May-20-2020

Code answers related to "check if value in array is between the values in two other arrays at same location"

Code answers related to "Javascript"

Browse Popular Code Answers by Language