News Score: Score the News, Sort the News, Rewrite the Headlines

The many faces of undefined in JavaScript - Musing Mortoray

Why does JavaScript have so many ways to represent unknown values? Of the ones I’ve found, only a couple seem necessary. The rest of these unknowns create confusion and lead to defects in code. It’s an unfortunate situation, so one worth understanding if you code in JavaScript. Below, I summarize how we can represent missing data, unknowns, or undefined values in JavaScript. In this article, I’ll give more details to each of them. The Simple Cases null: A real value with a distinct type undefine...

Read more at mortoray.com

© News Score  score the news, sort the news, rewrite the headlines