Iterator.prototype.every()
Iterator.prototype.every() is a JavaScript method in the Iterator category. Tests if all values pass a test. The syntax is iterator.every(callbackFn). A typical example: Iterator.from([1,2,3]).every(x => x > 0) // true. A close sibling is yield, which pauses a generator. A close sibling is Iterator.prototype.find(), which returns the first value that passes a test. A close sibling is Iterator.prototype.some(), which checks if any value passes a test. A close sibling is Iterator.prototype.forEach(), which executes for each value. More about this category: Iterator and generator methods. Related Iterator methods: yield, Iterator.prototype.find(), Iterator.prototype.some(), Iterator.prototype.forEach(), Iterator.prototype.reduce(), Iterator.prototype.toArray(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try Iterator.prototype.every() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.