Home /
Expert Answers /
Computer Science /
write-a-function-called-pluck-which-takes-an-array-of-objects-and-the-name-of-a-key-the-function-pa620
(Solved): Write a function called pluck, which takes an array of objects and the name of a key. The function ...
Write a function called pluck, which takes an array of objects and the name of a key. The function should return an array containing the value associated with that key for each object, or - 1 if that key is not present in the object.