Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

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

Code

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)}`)
  }
}