JSFiddle - React, Tailwind, and code Playground

by eitanp461

JavaScript

function Cat1(name) {
	return {
  	meeow: function() {
    	var output = '';
      for (var chi in name) {
      	for (var _ in ['a', 'b', 'c'])
        	output += name[chi];
      }
      console.log(output);
      return this;
    },
    setName: function(newName) {
    	name = newName;
    	return this;
    }
  };
}

Cat1('Mitzi').meeow().setName('hi').meeow();