I am working on this code below. I am attempting to retrieve only the values, not the keys. What this is not doing is providing me with the values but the keys. Can you help me to get this to work properly? Unfortunately I cannot use the object.values() function, therefore I am at a loss right now. Sorry This was not stated when I posted the original.
function values(obj) {
let arr = [];
for (let value in obj) {
arr.push(value);
}
return arr;
}
let nicknames = {a:`Sunny`, b:`Weirdo`, c:`Chicken`,d:`Tokyo`}
let nicknameValues = values(nicknames)
console.log(nicknameValues)