Find character in string without regex

Find character in string without regex
0

#1

Hello guys,
I want to write a code that will find whether a special character (specifically $,#, or @) exists in a string or not, but without using any regex.


#2

string.indexOf(char) !== -1 is an obvious choice.
Or string.includes(char) in newer browsers.
You can always iterate over the string yourself, of course


#3

okay, thanks for help.


#4