Check Value Exists In Javascript Array Slice Method In Javascript