I am working on creating an increase
function. This seemingly straightforward task has left me baffled.
Here is an example of what I aim to achieve:
var y=10;
y.increase();
console.log(y); //11
This is what I attempted:
Number.prototype.increase=function(){
this++; //but it caused a parser error
};