Skip to content

Instantly share code, notes, and snippets.

@wtype
Last active July 14, 2023 22:54
Show Gist options
  • Save wtype/03f8dfa20a0b05327ade00e24b53a864 to your computer and use it in GitHub Desktop.
Save wtype/03f8dfa20a0b05327ade00e24b53a864 to your computer and use it in GitHub Desktop.
Generate a random cook emoji of all skin tones and people types.
const cook = (() => {
const tones = ['🏻', '🏼', '🏽', '🏾', '🏿'];
const people = ['🧑', '👩', '👨'];
return () => {
const randomTone = tones[Math.floor(Math.random() * tones.length)];
const randomPerson = people[Math.floor(Math.random() * people.length)];
const cook = randomPerson + randomTone + '‍' + '🍳';
return cook;
};
})();
for (let i = 0; i < 150; ++i) {
console.log(cook());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment