String.includes() Method
The includes() method in JavaScript is used with strings to check if a specified substring is present, returning true if found, false if not.
Syntax:
string.includes( searchvalue, start )
Example: This method shows the basic use of the String includes() Method.
Javascript
let str = "Welcome to w3wiki." ; let check = str.includes( "Geeks" ); console.log(check); |
Output
true
JS 2015 or ECMAScript 6 (ES6)
JS 2015 (ES6) also known as ECMAScript 6 (ES6), ECMAScript 6 (ES6) is a significant update to JavaScript, introducing arrow functions, classes, template literals, let and const for variable declaration, enhanced object literals, destructuring, and more modern features for better code organization and readability.
Contact Us