I have a situation where I have an object with multiple keys like
let obj ={
a:"33",
b:"44",
}
There can be many keys with values.Now what I am looking for is to create a method
such that
obj.prototype.toNumber=function()
{
// change the particular key's value for which its called to number
}
So suppose if I do like
obj["a"].toNumber() ;
// Will change the value of obj["a"]
to the number
or Do I have to add this method on string prototype
?