Tag Archives

3 Articles

Javascript string in (includes)

Here a quick example how in javascript the includes function on an string works. In other programming language its also known as “in” or “contains” function.

var data = "Hello world, here is some test string to show the includes method.";
if(data.includes("test")) {
	console.log("The string includes test");
}

Output:

The string includes test