JSFiddle - React, Tailwind, and code Playground

by Peer Reynders

JavaScript

show('NaN');     // "old: true new: false"
show(undefined); // "old: true new: false"
show({});        // "old: true new: false"
show('blabla');  // "old: true new: false"

function show(value) {
  console.log(`old: ${isNaN(value)} new: ${Number.isNaN(value)}`);
}