Я сделал функцию is_in, посмотрите на мой пример:
array1 = ["hello","two","three"]
array2 = ["hello"]
is_in = (array1, array2) ->
for i in array2
for j in array1
if i is j then return true
console.log is_in(array1, array2)
Тест здесь
Взглянув на пример пересечения, я могу достичь этого другим способом:
intersection = (a, b) ->
[a, b] = [b, a] if a.length > b.length
return true for value in a when value in b
array1 = ["hello","two","three"]
array2 = ["hello"]
console.log intersection(array1, array2)
Тест здесь