We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Nice post, very helpful in getting my code running:
const mill = { b: "c", c: "v", d: "J", e: "a", f: "h", i: "i", l: "n", m: "S", o: "y", p: "P", s: "p", r: "r", t: "t", u: "o", " ": " ", "&": ">"};class Baker { constructor(grain) { this.grain = grain; } toString(){ return "iWater for the win!!"; }}const oatmeal = (oat, skip=1) => mill[oat];function bakeBread (rye, skip=1) { let bread = ""; for (let i = 0, len = rye.length; i < len; i+=skip) { bread += oatmeal(rye[i]); } return bread;}let Bakery = (superclass) => class extends superclass { toString() { return bakeBread(this.grain); }};class ImportantestMessage extends Bakery(Baker) { constructor(grain) { super(grain); }}let msg = new ImportantestMessage("potful & decembrist");console.log(msg);
Good work, just be careful of putting oatmeal in the mill as you'll get cross-contamination.This will fix it:
"&": "<"
Nice post, very helpful in getting my code running: