How to check if a number is NaN or Infinity in JavaScript?

How to check if a number is NaN or Infinity in JavaScript?

More to explore

Based on this image's title: “How to check if a number is NaN or Infinity in JavaScript?