const languages = ['javascript', 'php', 'ruby', 'python'];
for (const language of languages) {
console.log(`language is ${language}`);
}
//You can simply return if you want to skip the current iteration.
//Since you're in a function, if you return before doing anything else,
//then you have effectively skipped execution of the code below the
//return statement.
const languages = ['javascript', 'php', 'ruby', 'python'];
for (const language of languages) {
console.log(`language is ${language}`);
}
//You can simply return if you want to skip the current iteration.
//Since you're in a function, if you return before doing anything else,
//then you have effectively skipped execution of the code below the
//return statement.