Skip to content

Instantly share code, notes, and snippets.

@stuart-haas
Created May 27, 2022 17:05
Show Gist options
  • Save stuart-haas/849672808bb683079c06309f836c9375 to your computer and use it in GitHub Desktop.
Save stuart-haas/849672808bb683079c06309f836c9375 to your computer and use it in GitHub Desktop.
Code Baby
const assert = (...args) => {
this.args = args
return {
equals: (arg) => {
console.log(`${this.args.join(' + ')} = ${arg}`)
return this.args
}
}
return this;
}
const male = String.fromCodePoint(0x1F468)
const female = String.fromCodePoint(0x1F469)
const offspring = String.fromCodePoint(0x1F476)
assert(male, female).equals(String.fromCodePoint(0x1F476))
👨 + 👩 = 👶
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment