Skip to content
  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in
Logo1

zhangtingyan / my-project

Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • my-project
  • this.html
  • zhangtingyan's avatar
    文件复制 · 11324a7b
    zhangtingyan committed Mar 25, 2020
    11324a7b
this.html 337 Bytes
RawBlameHistoryPermalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<!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>