Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  191] [ 5]  / answers: 1 / hits: 23879  / 12 Years ago, tue, october 9, 2012, 12:00:00

I need to do something like this:




  1. Have a variable of some type.

  2. Run in a loop and assign all the possible ASCII characters to this variable and print them, one by one.



Is something similar possible for UNICODE also?


More From » unicode

 Answers
10

I'm not sure how exactly you want to print, but this will console.log printable ascii



for(var i=32;i<127;++i) console.log(String.fromCharCode(i));


You can document.write then if that's your intention. And if the environment is unicode, it should work for unicode as well, I believe.


[#82673] Monday, October 8, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
juancarlos

Total Points: 580
Total Questions: 105
Total Answers: 103

Location: Grenada
Member since Sun, Dec 20, 2020
4 Years ago
;