Includes() vs indexOf() in JavaScript

added by JavaScript Kicks
4/24/2018 11:10:24 AM

4032 Views

ES2016 Specifications included the includes() method for Array data structure. The includes() method check if an array includes a certain element, returning true or false as appropriate. But in ES5 we are used to performing operations like this with indexOf() method. Using includes() method.


0 comments