Not a Number.
if you type:
js nan in google the first result is:
which tells you everything you need to know
as programmer, google and stackoverflow are you friends, use them
NaN is a member of the Number class
> typeof(NaN) => 'number'
NaN as its best guess…
> parseInt("n") => NaN
let n = NaN;
In fact we never use it in any expressions. Just like
undefined, it is a fallback for the interpreter when nothing else will do.
While you are looking up properties and functions, include
isNaN() in your research.
class. Every object in JS can trace its prototype chain up to the parent constructors which are the blueprints that object instances follow.
Objects are essentially data, and they fall into three main categories:
primitive wrappers; eg. numbers, strings, booleans, null, undefined reference objects; eg. data containers such as objects and arrays functions; eg. input, storage, retrieval, processing, and output
From a basic point of view, and going forward associate
class with the object prototype a particular type of data inherits from.
ECMAScript which is the language standard that JS adheres to. As such, ES and JS are interchangeable names. Up to around 2010 we had ES5 (ECMAScript version 5) and then came version 6, ES6.
Today the language has matured even more and ES8 is on the horizon. The learning environment you are in (on CC) supports both ES5 and ES6 (so long as your browser does). Features of the later versions (post ES5) may not be supported in some browsers. Most do support ES6+.
In the meantime, focus more on your lessons and less on asking trivial questions that a quick search would handle.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.