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(){ | |
var myVar='b' | |
// console.log(this) | |
console.log(this.myVar,'this.myVar') | |
console.log(myVar,'myVar') | |
} | |
var myVar='a' | |
console.log(this.myVar,'this.myVar') | |
b() |
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'; |
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
def mydec(func): | |
def wrapper(*args,**kwargs): | |
print('before') | |
result=func(*args,**kwargs) | |
print('after') | |
return result | |
return wrapper |
NewerOlder