Say I have an object like:
const myObj = { color: 'red', score: 8 };
I can access these attributes with:
myObj.color // 'red'
and:
Object.values(myObj) // ['red', 8]
I want to be able to store extra data in the object, that is accessible, but won't be found by Object.values() for example:
myObj.greeting // "hello"
// or alternatively
myObj.greeting() // "hello"
Object.values(myObj // ['red', 8] greeting is not picked up by Object.values()
Preferably using modern JavaScript like classes if necessary, rather than directly using prototypes.