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.
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
2 Likes
okay, thanks for help.