Skip to content
Advertisement

How can we print a list of ASCII characters to the console, except forthose characters which have an escape sequence?

For any ascii characters ch, I would like to print ch unless repr(ch) begins with a back-slash character.

I want to print a list of all of the “nice” ascii characters.

Failed Attempt

JavaScript

The console print-out is:

JavaScript

I seem to have printed a lot of weird unicode characters, such as ç and õ

Advertisement

Answer

JavaScript

As sj95126 wrote:

values above 127 aren’t ASCII characters

Here’s right code

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement