Articles → JavaScript → Includes Method In Javascript

Includes Method In Javascript






Purpose





Example


<html><head><title>Includes method demo</title><script>
      var students = ["karan", "varun", "vijay"];
      alert(students.includes("karan"));
    </script></head><body></body></html>



Output


Picture showing the output of includes method in JavaScript

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, June 6, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250