Invisible Unicode Characters
- This code snippet ouputs the first 256 Unicode code points.
- If the character is invisible, it says that, otherwise it prints out the character itself.
-
I set this up initially for
my zeros and ones of computers post
for (let i = 0; i < 256; i ++) {
if (i < 33) {
console.log(`${i} (invisible)`)
} else if (i > 126 && i < 161) {
console.log(`${i} (invisible)`)
} else if (i == 173) {
console.log(`${i} (invisible)`)
} else {
console.log(`${i} ${String.fromCharCode(i)}`)
}
}
-- end of line --