Created
August 10, 2020 20:15
-
-
Save hyber1z0r/e61801d853df5e8923147ced012018e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let todo: Todo | undefined; | |
for (let i = 0; i < todos.length; i++) { | |
if (todos[i].id === 1) { | |
todo = todos[i]; | |
break; // Remember to break so we don't keep iterating after we found it | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment