Implement pick(obj, keys)
Write pick(obj, keys) that returns a new object containing only the given keys. Keys not present on obj are silently skipped.
pick({ a: 1, b: 2, c: 3 }, ["a", "c"]); // { a: 1, c: 3 }pick(obj, keys)Write pick(obj, keys) that returns a new object containing only the given keys. Keys not present on obj are silently skipped.
pick({ a: 1, b: 2, c: 3 }, ["a", "c"]); // { a: 1, c: 3 }Run your code to see results.
Stuck? This challenge exercises: