function test(a,b,c,d,e){ if(b==undefined) b = 1; if(c==undefined) c = 1; } //test함수 호출시에 a,d,e 만 인자를 전달하고 b, c는 기본값을 사용하고 싶다면? a:10, d:20, e:30 test(a,,,d,e); function test(opt){ var dft = {a:1, b:1, c:1, d:1, e:1}; $.extend(dft, opt); } test({a:10, d:20, e:30});
Develop
2013.12.17 14:05
[js] 객체 머지..
Views 8961 Votes 0 Comment 0
나중에 정리해서 다시 올릴것..
-
[ios] UIView에서 상위 UIViewController 가져오기
-
[ios] UITableView 특정 Row만 Update
-
[ios] UILabel top alignㅎㅎ
-
[ios] UIColor 지정에서 RGB define ㅎㅎ
-
[ios] UIButton multi-line iOS7
-
[ios] UIAlertView 초간단 샘플 ㅎㅎ
-
[ios] UDID와 UUID (디바이스의 Unique Identifier)
-
[ios] UDID 사용 제한에 따른 대안들
-
[ios] Touch ID 적용 샘플 코드 (예제)
-
[ios] Thread Loop 내에서 UI 업데이트 방법
-
[ios] TextField 특정 문자만 사용하도록 하기
-
[ios] Swift 4 String, Date, DateFormatter 예제
-
[ios] Swift 4 Singleton inheritance
-
[ios] Swift 4 Dictionary 사용하기
-
[ios] StoryBoard(xib) 없이 프로젝트 만들기
-
[ios] Start developing your navigation app for CarPlay without enrollment