How would I write a function that takes an object, and a string of the name of a key in that object and return the value of that key?
For example:
retrieveKey({name: 'Joel'}, 'name') // returns 'Joel'
retrieveKey({password: 'Fruit!'}, 'password') // returns 'Fruit!'
retrieveKey({name: 'Joel'}, 'age') // returns undefined