Skip to content

Instantly share code, notes, and snippets.

@hebertcisco
Created May 23, 2020 05:27
Show Gist options
  • Save hebertcisco/894f915c23171cd61603e773427b1813 to your computer and use it in GitHub Desktop.
Save hebertcisco/894f915c23171cd61603e773427b1813 to your computer and use it in GitHub Desktop.
A for loop is a control flow statement to specify the iteration, which allows the code to be executed repeatedly.
const mySkills = [
"C#",
"JavaScript",
"TypeScript",
"HTML",
"CSS3",
"Angular",
"ReactJS",
"React Native",
"NodeJs",
"MongoDB",
"Python",
"C",
];
for (let index = 0; index < mySkills.length; index++) {
console.log(`${index+1}. ${mySkills[index]}`)
if (mySkills[index] === 'TypeScript') break
}
for (let index = 0; index < mySkills.length; index++) {
if (mySkills[index] === 'TypeScript') continue
console.log(`${index+1}. ${mySkills[index]}`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment