includes() method in JS

includes() in JS  


<!DOCTYPE html>
<html>
<head>
<title>Test page for positions</title>
<script type="text/javascript">

var str= "HELLO WORLD!!";

var b= str.includes("hello");//includes is case sensitive
var c= str.includes("WORLD");


console.log(b);
console.log(c);

</script>

</head>
<body>

</body>
</html>



Comments

Popular posts from this blog