lang/node

Node.js Arguments

C/H 2016. 1. 28. 15:28

var myfunc = function(one) {
	arguments.callee === myfunc;
	arguments[0] === one;
	arguments[1] === 2;
	arguments.length === 3;
}

myfunc(1, 2, 3);

var myfunc = function(one) {
	console.log( arguments.callee === myfunc );
	console.log( arguments[0] === one );
	console.log( arguments[1] === 2 );
	console.log( arguments.length === 3 );
}

myfunc(1, 2, 3);

var myfunc = function(one){
	console.log( aguments );
	ocnsole.log( JSON.stringify(aguments) );
}


반응형

'lang > node' 카테고리의 다른 글

npm CLI Commands  (0) 2016.02.18
Nodejs Mysql PROTOCOL_ENQUEUE_AFTER_QUIT 에러  (0) 2016.02.02
nodejs mysql multiquerys  (0) 2016.01.18
ENOENT  (0) 2015.12.30
socket.io room join socket.id express api On Nodejs 5.1.0 + socket.io 1.3.7  (0) 2015.12.17