How can I get the name of function inside a JavaScript function? September 18, 2023 by Tarik This will work: function test() { var z = arguments.callee.name; console.log(z); }