for(var i=0; i<5; i++) setTimeOut console.log(i) "trick" question whats the output and why?
Asked in the Tech screen stage. This JS fundamentals question tests var scoping, closures, and the event loop.
Implement predict_timeout_output(final_value), which models the five callbacks after the loop completes. Return the five values they print.
def predict_timeout_output(final_value):