I'm learning Javascript by reading some 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 function is added to Object.prototype
.
I don't quite get the void 0
at the end of the ternary expression. Can someone explain it to me?
Thanks.