SyntaxFix
Write A Post
Hire A Developer
Questions
Since ECMAScript6, one can use Set :
var myArray = ['A', 'B', 'C']; var mySet = new Set(myArray); var hasB = mySet.has('B'); // true var hasZ = mySet.has('Z'); // false