Skip to content

Instantly share code, notes, and snippets.

@TravelingTechGuy
Created August 27, 2011 10:28
Show Gist options
  • Save TravelingTechGuy/1175224 to your computer and use it in GitHub Desktop.
Save TravelingTechGuy/1175224 to your computer and use it in GitHub Desktop.
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