Skip to content

Instantly share code, notes, and snippets.

@olvrb
Created April 25, 2018 07:41
Show Gist options
  • Save olvrb/fbf108f827666425005e3afd3b3b9b08 to your computer and use it in GitHub Desktop.
Save olvrb/fbf108f827666425005e3afd3b3b9b08 to your computer and use it in GitHub Desktop.
nestedloo:for(y=1; y<200;y++){const fall1=Math.floor(456*x+(y>100?2.4*y:0));const fall2=Math.floor(345*x+1.5*y);if(fall1 < fall2){console.log(`${x}, ${y}`); break nestedloo;}console.log(`fall 1: 456*${x} + ${(y>100?2.4*y:0)} = ${fall1}`);console.log(`fall 2: ${fall2}`)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment