JSFiddle - React, Tailwind, and code Playground

JavaScript

let count = 0;

(function run (){
   count++;
   
   try {
     count++;
     run();
   }catch (e){
      alert(`max stack is ${count}`);
   }
})();