Tag: abruptly

Interview: Can You Stop forEach in JavaScript?

Can you stop a forEach loop in JavaScript? This is a question I was once asked during an interview, and my initial response was, “No, I can’t do that.” Unfortunately, my response led the interviewer to end the interview abruptly. Frustrated with the outcome, I asked...