On this podcast we talk about the Array prototype function Array.every(). Here are some code examples for the Array.Every() function:
const x = [1, 2, 3, 4, 5] x.every((element) => { return element > 0; }) // true x.every((element) => { return element !== 4; }) // false x.every((element, ind) => { // element would be 1 while ind is 0, 2 > 1, and so on return element > ind; }) // true
The post 004.5 – JavaScript Pro Tip – Array.every() appeared first on Full Stack Javascript Podcast.