Created
September 21, 2019 14:00
-
-
Save hyongbai/effca40bec7506586e2e968527258867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trace(count) { | |
var i = 0; | |
var caller = arguments.callee.caller; | |
count = count || 10; | |
while ((caller = caller.caller) && i++ < count) { | |
console.log(i+":"+caller.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment