Skip to content

Instantly share code, notes, and snippets.

@merryt
Created June 6, 2023 13:47
Show Gist options
  • Select an option

  • Save merryt/4b87e38fae8890b222c3230778653a36 to your computer and use it in GitHub Desktop.

Select an option

Save merryt/4b87e38fae8890b222c3230778653a36 to your computer and use it in GitHub Desktop.
for(let i = 1; i <= 100; i++){
crackle = i % 3 === 0 ? "Crackle" : "";
pop = i % 5 === 0 ? "Pop": "";
console.log(crackle+pop !== "" ? crackle+pop : i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment