I am trying to understand why the result when I call the below function is "no" because the property c should exist. Does anyone know why? Thanks!!!
var letters = function() {
this.a = 5;
this.b = 20;
};
letters.prototype = {
c: 10
};
var letters = new letters();
function looping(obj){
if (obj.hasOwnProperty(this.c)) {
console.log("ua");
}
else {
console.log("no");
}
}
looping(letters);