make use of RegExp.prototype.test()
The test() method executes a search for a match between a regular expression and a specified string. Returns true or false.
function hasNumber(myString) {
return /\d/.test(myString);
}
/\d/.test("dfgsdswefx"); // false
/\d/.test("df3sdswef"); // true