Daniel Cobo
{🍦}

{🍦}

Bulletproof type checks in JavaScript

May 17, 20213 min read

Using typeof To check what type is a variable you would most likely use the typeof function. You can even skip the parenthesis (typeof someVariable is same as typeof(someVariable)). typeof works great for: strings numbers (not if checking integer vs...

Bulletproof type checks in JavaScript
Get the first and last moment of a day in Javascript
Check if the user is from EU with JavaScript
Get user's preferred languages with JavaScript
Get location by IP with JavaScript
Use custom CSS for image input