I have an Object which I am getting from API response. Now I want to perform some operation on that object and I want to do it in prototype way.
let's say I am getting following object
const user = {
name: "Carlos",
gender: "male"
}
Now I want to create a prototype function which can run directly on object like. user.isMale()
how can I achieve the same in ES6