Skip to content

Instantly share code, notes, and snippets.

@addyosmani
Last active February 3, 2016 18:31
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save addyosmani/96f360f1c8b80058ee79 to your computer and use it in GitHub Desktop.
Save addyosmani/96f360f1c8b80058ee79 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"));
@n3dst4
Copy link

n3dst4 commented Jan 4, 2016

I approve!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment