So I have been given a question below...
function translateKey(student, keyToChange, translation) { }
/*
This function will take an object representing a student's data, a key that needs changing, and its English translation.
E.g.
const student = {
prénom: 'Carla',
surname: 'Bruni',
job: 'Artist'
}
const keyToChange = 'prénom'
const translation = 'firstName'
It returns a **new object** with the key successfully translated into English.
E.g.
{
firstName: 'Carla',
surname: 'Bruni,
job: 'Artist'
}
*/
I have started off with ...
function translateKey(student, keyToChange, translation) {
const translated = {keyToChange : translation};
const newObject = {};
// not really sure where to go from here, help please!