UP | HOME

Merging Emoji in JavaScript

You can combine emojis to create a new emoji, for example:

var e = ['🏻', '🏼', '🏽', '🏾', '🏿'];

    function loop() {
        var s = '',
            i, m;

        for (i = 0; i < 10; i ++) {
            m = Math.floor(e.length * ((Math.sin((Date.now()/100) + i)+1)/2));
            s += '👶' + e[m];
        }

        location.hash = s;

        setTimeout(loop, 50);
    }

    loop();

Read more here: https://flaviocopes.com/javascript-unicode/

Date: 2019-01-17 Thu 00:00

Author: Huy Tran

Created: 2019-04-22 Mon 14:41