Unicode Character Sequence With Zero Left-Padding

var a = [];
for(var i=0; i< 100; i++)
  a.push("\\u" + ("0000" + (600 + i).toString(16)).substr(-4));
console.log(a.join(" "))


Usage Example:
Say you have this nice eye-emoji 👁,
and you want to ‘have’ its other “near” emoji (Unicode) symbols.
You can use the loop above to render as much symbols as you want, using the “base” of this emoji, Using the developer’s-panel’s console to run just a few, easy, JavaScript snippets.

First run escape("👁") to get %uD83D%uDC41, the Unicode escaped form is: \uD83D\uDC41.
Notice that this emoji is a combination of a pair of Unicode characters.
paste 0xDC41 to the developer’s-panel’s-console, to get the decimal 56385.

Getting the next 100 emoji symbols, after 👁:
Slightly modify the above-code to: (and run it in the console)

var a = [];
for(var i=0; i< 100; i++)
  a.push("\\uD83D\\u" + ("0000" + (56385 + i).toString(16)).substr(-4));
console.log(a.join(" "))

This will result with a long list of space-separated, Unicode-escaped characters.

which you can now double-click, copy, and paste it back to the console (wrap it with a pair of "") to have it shown as the emoji-symbols themselves.

You can also paste the end-emoji result directly to http://bin.eladkarako.com for editing.

Leave a Reply