Created
June 11, 2014 10:55
-
-
Save crongro/327cbfe18add65a9c0c3 to your computer and use it in GitHub Desktop.
사용자정의 Global variables 확인 방법
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
// 초기 코드에서 이걸 계산. | |
this.__d = []; | |
for (i in window) { | |
this.__d.push(i); | |
} | |
//나중에 이 메소드를 실행 | |
(function(win){ | |
var __result = ""; | |
console.log(win.__d); | |
for (i in win) { | |
if(win.__d.indexOf(i) < 0) { | |
__result += "\n" + i; | |
}else{ | |
} | |
} | |
console.log("[user defined Global variables]\n" , __result); | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Object.keys( window );