How to Check If a Value Exists in an Array using es6

How to Check If a Value Exists in an Array

const arr = ["sam","david","tom"];

 In above we need to check whether david include s in are or not

const result = arr.contains("david");

Comments

Popular posts from this blog

world tourism guide Template

Es6 how to check if value is not null or undefined?