Created
October 13, 2020 15:22
-
-
Save wpninj/5b7e384f38c7551c31dc96043282c80b to your computer and use it in GitHub Desktop.
Javascript Filter Object's keys
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
let points = {a: -1, b: -1, c: -1, d: -1, e: -1, f: 3, z:4} | |
Object.keys(points).filter(key => ~'abcde'.indexOf(key)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment