How can i see if there is a number in string in javascript? [duplicate]

I am trying to make a registration system and I am trying to code a system that understands if there are special characters(dot, numbers, semicolons, etc.).I am trying to use IndexOf() but it doesn’t work. How can I do this?