function duple_test() {
function inner() {
/* body comes here */
}
} // good
function duple_test() {
function () {
/* body comes here */
} // anonymous inner class can't be reached
} // bad
function duple_test() {
var one = function () {
} // anonymous but reachable
}
function one(){
function two() {
function three() {
/* body comes here */
}
}
} // good
/* Arguments 객체 테스트 */
function arg_test(one, two) {
document.write(one);
document.write(arguments[0]);
document.write(two);
document.write(arguments[1]);
document.write(arguments.length);
document.write(arguments[3]); // 존재하지 않는 배열을 참조한다면?
arguments[3] = 5; // 파라메터 삽입 가능
document.write(arguments[3]);
}
arg_test(3, 4);