Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Display JavaScript function name
var fname = /^function\s+([^(]+)/.exec(arguments.callee.toString())[1];
console.log(fname);
//alert(fname);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment