Last active
May 3, 2019 18:42
-
-
Save alik472/0f7aba19e66964610903ed179482f110 to your computer and use it in GitHub Desktop.
JS Days - Part 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function b(){ | |
console.log("Called b!") | |
} | |
// b(); | |
// console.log(a); | |
var a='var a'; | |
// console.log(a) | |
// console.log(this) | |
function Person(name,age){ | |
this.name=name | |
this.age=age | |
} | |
p1=new Person('leo',10) | |
p2=Object.create(p1) | |
p2.name='messi' | |
p2.age=19 | |
// console.log(p1.__proto__.__proto__.__proto__.__proto__) | |
// console.log(Object.getPrototypeOf(p1),'--->prototype') | |
console.log(p1.prototype, 'p1-prototype') | |
console.log(p2,'--->p2') | |
// console.log(Object.prototype) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment