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