Code Snippet

function func() {
	// Get function code text
	var thisFuncText = arguments.callee.toString();

	// Print out function code
	console.log(thisFuncText);
}

// Function call
func();

Console Out

function func() {
	// Get function code text
	var thisFuncText = arguments.callee.toString();

	// Print out function code
	console.log(thisFuncText);
}

티스토리 툴바