Getting the current function name dynamically in JavaScript