Answers for "check if string is in string javascript"

23

check for substring javascript

const string = "javascript";
const substring = "script";

console.log(string.includes(substring));  //true
Posted by: Guest on July-06-2020
8

angular string contains

const string = "foo";
const substring = "oo";

console.log(string.includes(substring));
Posted by: Guest on March-24-2020
1

if is a string javascript

function isString(x) {
  return Object.prototype.toString.call(x) === "[object String]"
}
Posted by: Guest on April-06-2021

Code answers related to "check if string is in string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language