Javascript

Javascript

isNaN('') = false 😅, how to handle it?

I recently noticed that `isNaN('')` and `isNaN(null)` both return `false` in JavaScript. It means that both empty string and `null` are valid numbers. So if you want to perform any number specific operation by just comparing the variable using `isNaN()`, it won't work.

Read
Javascript

JavaScript Performance using console.time() & console.timeEnd()

Many a times it's necessary to check the time your code is taking to execute. JavaScript runs on the client's local machine and we don't want our application to be sluggish even in the devices with lesser hardware configurations.

Read