Skip to content

Instantly share code, notes, and snippets.

@thamizhchelvan
Created December 31, 2017 10:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thamizhchelvan/245821c8a877ec25c36bcac6cb1de15d to your computer and use it in GitHub Desktop.
Save thamizhchelvan/245821c8a877ec25c36bcac6cb1de15d to your computer and use it in GitHub Desktop.
Count the number of call stack
'use strict';
function countCallStack(){
try{
return 1 + countCallStack();
}
catch(error){
return 1;
}
}
var total = countCallStack();
console.log(total);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment