DEV Community

Sleepless Yogi
Sleepless Yogi

Posted on

JavaScript simple tricks everyone should know

Check if the argument is a Number

Below is the correct way to validate Number types in JavaScript.

Alt Text

Set default value like a pro

Want to learn a sweet way to set default values?

Alt Text

True sort your arrays

Have you ever had a facepalm moment when using the JavaScript sort function out-of-the-box?

Alt Text


I just launched my new eBook on web development technologies and I am super pumped about it.

HTML to React: The Ultimate Guide

The book contains a lot more tips and tricks on JavaScript, ReactJS, and Web Development in general. It has straight to the point explanations on web dev concepts with simple, concise, and fun examples.

Top comments (0)