Why emptyArray.every()
returns true
? It doesn´t make sense to me because there is no element which you can apply the callBackFunction
on?
Example:
let x=[];
x.every(n=>n>10);
I would expect an error…
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
Why emptyArray.every()
returns true
? It doesn´t make sense to me because there is no element which you can apply the callBackFunction
on?
Example:
let x=[];
x.every(n=>n>10);
I would expect an error…