Skip to content

Instantly share code, notes, and snippets.

@Killavus
Created November 20, 2017 12:55
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 Killavus/87cbfb4b3187258cddaf7032e5cf7aeb to your computer and use it in GitHub Desktop.
Save Killavus/87cbfb4b3187258cddaf7032e5cf7aeb to your computer and use it in GitHub Desktop.
for(var x = 1; x < 20; ++x) {
var label = '';
if (x % 3 === 0) { label += 'Julia'; }
if (x % 5 === 0) { label += 'James'; }
console.log(label.length > 0 ? label : x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment