Answers for "how to check if string contains number or string in javascript"

1

check if a string contains digits js

function hasNumber(myString) {
  return /\d/.test(myString);
}
Posted by: Guest on July-22-2020
1

javascript check if string contains a text substring

stringVariable.includes("Your Text");
Posted by: Guest on November-22-2020

Code answers related to "how to check if string contains number or string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language