I have string like this: str = ball, apple, mouse, kindle;
and I have another text to search in this string: search = 'apple';
How to determine using JavaScript if apple
exist in comma delimited string?
P.S: str
can be with or without spaces between comma and next item.