Skip to content

Instantly share code, notes, and snippets.

@Sonia-Shurmi
Created April 4, 2020 01:16
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 Sonia-Shurmi/11fe4a82fcc293c746c53c914415428d to your computer and use it in GitHub Desktop.
Save Sonia-Shurmi/11fe4a82fcc293c746c53c914415428d to your computer and use it in GitHub Desktop.
var x = 1;
while (x <= 20) {
if((x % 3) === 0){
console.log("Julia");
}else if((x % 5) === 0){
console.log("James");
}else if(((x % 3) === 0) && ((x % 5) === 0)){
console.log("JuliaJames");
}else {
console.log(x);
}
x++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment