I have a target array ["apple","banana","orange"]
, and I want to check if other arrays contain any one of the target array elements.
(我有一个目标数组["apple","banana","orange"]
,我想检查其他数组是否包含任何目标数组元素。)
For example:
(例如:)
["apple","grape"] //returns true;
["apple","banana","pineapple"] //returns true;
["grape", "pineapple"] //returns false;
How can I do it in JavaScript?
(如何在JavaScript中完成?)
ask by Alex translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…