this.html
337 Bytes
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<script>
var test = function(){};
test.prototype={
foo:"apple",
fun:function(){
this.foo = "banana"
}
};
var myTest = new test();
myTest.fun();
console.log(myTest.hasOwnProperty("foo"));
console.log(myTest.hasOwnProperty("fun"));
console.log(myTest);
</script>
</body>
</html>