Skip to content

Instantly share code, notes, and snippets.

@edygar
Created November 13, 2014 19:41
Show Gist options
  • Save edygar/89d18036db62685b4d48 to your computer and use it in GitHub Desktop.
Save edygar/89d18036db62685b4d48 to your computer and use it in GitHub Desktop.
function zeroRight(i) {
var j = 1,
k = i;
while(k > 10) {
j *= 10;
k = parseInt(k/10);
}
return k*j;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment