Find If Array Contains Value Javascript Substring Vs Slice