It is possible to create new property with method of this same object? Below is the code where I tried to do it without the expected result.
var base = {
set: function(pr, v) {
this.pr = v;
}
}
base.set("cat", "Filemon")
console.log(base)