function debugPrint(msg){
//...
}
I would like to add automatic line number detection, that is whoever calls the debugPrint function, that line number will also be displayed. Anyone know anyway of doing this without, actually doing something like, debugPrint("...", new Error().lineNumber)
I want to avoid having to pass the line number to the debugPrint.
any advice?