JSFiddle - React, Tailwind, and code Playground
by paulocoelho
JavaScript
pPoint = function(x,y){
this.x = x || 0;
this.y = y || 0;
}
pPoint.prototype = {
constructor:pPoint,
add:function(){
return this.x+this.y;
}
}
Array.prototype = {
abcd:function(){
console.log("bla bla testing");
}
}
a = new pPoint(10,20)
console.log(a.add());
b = new Array();
b.abcd();