How to make javascript exit the loop if the code stucks at an API call and it just hangs there forever?
How to make javascript exit the loop (time based) if the code stucks at an API call and it just hangs there forever? pseudo code: for loop --- api call --- if got response from "api call" in 5 seconds,…