It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
Unlock the full InfoQ experience by logging in! Stay updated with your favorite authors and topics, engage with content, and download exclusive resources. In this episode, Thomas Betts chats with ...