Behold, the new hotness! The shapely Arrow Function has driven away the irksome function
keyword and (by virtue of lexical this
scoping) bought joy to many a JavaScript programmer. Yet, as the following account relates, even the best tools should be used with discretion. Continue reading “Of Classes and Arrow Functions (a cautionary tale)”
Tag: class
Fixing the JavaScript typeof operator
Working with JavaScript’s typeof
operator is a bit like operating a clapped-out old car (or an early model Dell Inspiron). It gets the job done (mostly) and you learn to work around the quirks – but you probably aspire to something better.
In this article I’ll give a brief overview of typeof
before introducing a tiny new function which is a fully-loaded, more reliable alternative that works directly with the language internals.
Continue reading “Fixing the JavaScript typeof operator”