Answers for "angular string contains"

8

angular string contains

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

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

angular string contains

var string = "foo";
var substring = "oo";

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

Code answers related to "Javascript"

Browse Popular Code Answers by Language