Skip to content

Instantly share code, notes, and snippets.

@learningjs
Forked from addyosmani/12-days.js
Created December 28, 2015 04:03
Show Gist options
  • Save learningjs/75cbbc21cedc30fa225e to your computer and use it in GitHub Desktop.
Save learningjs/75cbbc21cedc30fa225e to your computer and use it in GitHub Desktop.
12 Days of Christmas in ES2015 - paste this into your DevTools console!
// adapted from https://tonicdev.com/n3dst4/twelve-days-of-emoji
// full credit to n3dst4. I just rewrote this to be browser developer tools friendly.
const pressies = [
"🐦🍐🌳",
"🐒🐦",
"πŸ‡«πŸ‡·πŸ”",
"πŸ“žπŸ¦",
"πŸ’›πŸ’",
"🐦🍳 ",
"🐦🏊",
"πŸ‘§πŸ„",
"πŸ’ƒβ™«",
"πŸŽ©πŸƒ",
"πŸ‘΄πŸŽΊ",
"😜✌️",
].map((s, i) => new Array(i+1).fill(s).join(" ") + "\n\n");
console.log(Array.from(Array(13).keys()).slice(1).map(dayNum => dayNum + '\n' + pressies.slice(0, dayNum).reverse().join("")).join("\n"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment