This article explains the filter() method in JavaScript with an example that filters data from a given array.
Editorial changes — reviews, status changes and edits — are shown to the author of this article and to the editors.