JavaScript includes() Method or Function
Want to understand Properly Plz see the video carefully on YouTube channel name is Adisma
------------------------------------------------------------------------
The includes()
method returns true
if a string contains a specified string.
Otherwise it returns false
.
The includes()
method is case sensitive.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>includes() Method</h1>
<script>
const myList = [1, 2, 3, 5, "seemaSharma", "adisma", "seema"];
console.log(myList.includes("seema"));
</script>
</body>
</html>
Comments
Post a Comment