How find a specific character in js
snippet in javascript

How find a specific character in js

user3945

var word = "This is how you locate a word in a string";
var n = word.includes("word");

js check if string contains character

user7208

"FooBar".includes("oo"); // true

"FooBar".includes("foo"); // false

"FooBar".includes("oo", 2); // false