NERDJACKING
Published in

NERDJACKING

Making JavaScript “typeof” work

How to get the true data type of an element

Making JavaScript “typeof” work: how to get the true data type

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

Playground demo

Got something on your mind? Let us know in the comments 💪

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store