4
여러 개의 네임 스페이스로 나누고 싶은 큰 js 파일이 있습니다.JavaScript 여러 네임 스페이스
하나의 네임 스페이스에 모든 것을 유지하는 것이 좋습니다.
NAMESPACE_FIRST에서지도 빌드를 어떻게 호출합니까?
var NAMESPACE_FIRST = { init:function() { alert("onload functions"); }, this.map:function() { this.length = 0; }, this.map.prototype.build:function(){ return this.length; } }; var NAMESPACE_SECOND = { upload:function() { //do something }, delete:function() { //do something } }; $(function() { NAMESPACE_FIRST.init(); });