Skip to content

Instantly share code, notes, and snippets.

// pre-compiled
function randomElement(array) {
var index = Math.random() * array.length | 0;
return array[index];
}
function printEmoji(emoji, num) {
if (num <= 0)
return;
process.stdout.write(randomElement(emoji));
return printEmoji(emoji, --num);