The concept of
0/0; // NaN Math.sqrt(-1); // NaN Math.log(-1); // NaN // ...
NaN is actually, rarely used in a program. It is typically returned from a function or operation to indicate a failed operation on numbers. It is used to suggest that the value is not a legal number (where you may be expecting the return value to be a legal number).
This post was published by Daniyal Hamid. Daniyal currently works as the Head of Engineering in Germany and has 20+ years of experience in software engineering, design and marketing. Please show your love and support by sharing this post.