Let start of by having comma-separated strings with [a-z] words (no other characters):
var string1 = "apple,pear,banana,grape,strawberry";
var string2 = "strawberrry,raspberry,blueberry";
What is the most efficent way to determine which words are in both arrays. (assuming the strings are split on comma's)
regular expressions and split/join are fine ofcourse, but I rather avoid nested loops.