JSFiddle - React, Tailwind, and code Playground
JavaScript
var Blood = function() {
this.x = 0;
this.y = 0;
}
Blood.prototype.createSplatter = function() {
return [this.x-1, this.x+1, this.y-1, this.y+1];
};
var blood = new Blood()
console.log(blood.x);
console.log(blood.createSplatter());