JSFiddle - React, Tailwind, and code Playground
by ilazarte
JavaScript
var base = function() {
return {
run : function() {
console.log("running!");
},
walk : function() {
console.log("walk!");
},
jump : function() {
console.log("jump!");
},
play : function() {
this.walk();
this.jump();
this.run();
}
}
};
var inst = base();
inst.play();