Making JavaScript “typeof” work
Published in
Aug 17, 2020
How to get the true data type of an element
Say hello to #StraightToThePoint series
NERDJACKING #StraightToThePoint series: short stories with no chit-chat, just pure hands on code.
On every story you will find smart code snippets that can elevate your coding experience and save you time to focus on what’s important.
Formulas
Typescript
ES6
Usage
API
typeOf({}); // "object"
Real world scenario / Usage case