Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Java Script/2011년스터디/서지혜: Difference between revisions

From ZeroWiki
imported>rabierre
No edit summary
imported>rabierre
No edit summary
Line 1: Line 1:
* 함수
* 함수
** 중첩함수
** 중첩함수
* 중첩 함수 예
  function duple_test() {
  function duple_test() {
   function inner(){
   function inner() {
   }
   }
} // good
* 내부 익명함수는 접근할 수 없기 때문에 안됨
function duple_test() {
function () {
} // anonymous inner class can't be reached
} // bad
* 이 방법은 된다
function duple_test() {
var one = function () {
} // anonymous but reachable
}
* 여러번 중첩되어도 된다
function one(){
function two() {
function three() {
}
}
  } // good
  } // good



Revision as of 06:46, 18 January 2011

  • 함수
    • 중첩함수
  • 중첩 함수 예
function duple_test() {
  function inner() {
  }
}	// good
  • 내부 익명함수는 접근할 수 없기 때문에 안됨
function duple_test() {
	function () {
	} // anonymous inner class can't be reached
}	// bad
  • 이 방법은 된다
function duple_test() {
	var one = function () {
	} // anonymous but reachable
}	
  • 여러번 중첩되어도 된다
function one(){
	function two() {
		function three() {
		}
	}
}	// good