Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Number to Unicode sign

I have to print out the letters from A to Z each for itself. So I tried the following:

for(var i = 65; i < 91; i++) {
     $('#alphabet').append('<div class="letter">' + '%' + i + '</div>');
}

My idea is to use the decimal numbers of the letters (for example: 65 - A) to easily print them via loop. Is this possible or do I have to use an array?

Best regards.

like image 884
Stefan Surkamp Avatar asked Nov 01 '11 10:11

Stefan Surkamp


People also ask

How do I get Unicode symbols?

Inserting Unicode characters To insert a Unicode character, type the character code, press ALT, and then press X. For example, to type a dollar symbol ($), type 0024, press ALT, and then press X.

What is the Unicode of 9?

Unicode Character “9” (U+0039)

How do I change text to Unicode?

Unicode code converter. Type or paste text in the green box and click on the Convert button above it. Alternative representations will appear in all the other boxes. You can also do the same in any grey box, if you want to target only certain types of escaped text.


1 Answers

You can use String.fromCharCode to convert a character code to string.

like image 109
TJHeuvel Avatar answered Sep 23 '22 23:09

TJHeuvel