Hi FCC users. I have used some of built-in functions like isNaN()
. That will look like this:
console.log(isNaN({})); //returns true
But I have a question.
Let’s say that the Number.isNaN()
function has a hidden code that looks like this:
Number.isNaN = Number.isNaN || function isNaN(input) {
return typeof input === 'number' and isNaN(input);
}
Or the isNaN()
function has a hidden code that looks like this:
var isNaN = function (value) {
var n = Number(value);
return n !== n;
}
Are these supposed to be a polyfill? And what is a polyfill??
Please answer.
Best,
@pummarinbest