Skip to content

Instantly share code, notes, and snippets.

@ecaepsey
Created April 20, 2020 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecaepsey/c9da83b9615dfb3a485925f677511d0f to your computer and use it in GitHub Desktop.
Save ecaepsey/c9da83b9615dfb3a485925f677511d0f to your computer and use it in GitHub Desktop.
continue example
const userNames = ['petya', 'vasya', 'evgeny'];
const result = [];
for (const name of userNames) {
if (name === 'vasya') {
continue
;
}
result.push(name);
}
console.log(result); // => ['petya', 'evgeny']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment