I am learning to make library like jquery and trying to understand a piece of code where this.e is giving me hard time, where this 'e' come from and they are assigning object to it but when they return this they return just this not this.e .
function _(a) {
var b = {
key: "some val"
};
if (a) {
if (window === this) {
return new _(a)
}
this.e = document.getElementById(a);
return this
} else {
return b
}
}
_.prototype = {
hide: function() {
this.e.style.display = "none";
return this
}
HTML
<button onclick="_('abc')">click</button>
<div id="abc" style="width: 200px; height: 100px; background-color: pink;"> </div>