prototype Class Number
ejemplo como extender la clase Number con prototype
by Fabian Allel
JavaScript
Number.prototype.esPar=function(){
return this%2==0;
}
var numero=2;
var resultado=numero.esPar();
console.log(resultado);
by Fabian Allel
Number.prototype.esPar=function(){
return this%2==0;
}
var numero=2;
var resultado=numero.esPar();
console.log(resultado);