Created
April 9, 2021 09:13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const items = [1, 2, 3, 4]; | |
//before | |
const item = items.reverse().find(fn); // the reverse method mutates the array | |
//after | |
const item = items.findLast(fn); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment