JSFiddle - React, Tailwind, and code Playground
by eitanp461
JavaScript
function Cat2(name) {
this.name = name;
}
Cat2.prototype.meeow = function() { //**************** meeow *************** {
var output = '';
for (var chi in this.name) {
for (var i in ['a', 'b', 'c'])
output += this.name[chi]; //***************** append ****************;
}
console.log(output);
return this;
}
Cat2.prototype.setName = function(name) { //*************** setName ************* {
this.name = name; // ****************** name ************;
return this;
}
new Cat2('Mitzi').meeow().setName('hi').meeow();