Javascript Get Call Stack Simulation