I learn Javascript by reading some kind of code, but this function really puzzles me.
hv:
function(i) {
var _this = this;
return isArr(_this) ? _this.indexOf(i) > -1 : _this[i] !== void 0;
}
This feature has been added to Object.prototype.
I don't quite get void 0at the end of the triple expression. Can someone explain this to me?
Thank.
source
share