Skip to content

Get function name inside itself

nexssp edited this page Jan 23, 2020 · 1 revision

Get the function name inside the function:

function nexssFunction(){
  console.log(`Function Name: ${arguments.callee.name}`)
}

nexssFunction() // Result: Function Name: nexssFunction
Clone this wiki locally