Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AliceWonderland/5a1bb2d44f3c8500f895e4ee82249c92 to your computer and use it in GitHub Desktop.

Select an option

Save AliceWonderland/5a1bb2d44f3c8500f895e4ee82249c92 to your computer and use it in GitHub Desktop.
3.5 Zero Dark Thirty created by smillaraaq - https://repl.it/Gx3O/2
function removeZero(arg){
debugger;
var argToString=arg.toString();
var argToArray=argToString.split("");
while(argToArray.indexOf("0")>=0){
argToArray.splice(argToArray.indexOf("0"), 1);
}
argToString=argToArray.join("");
arg=Number(argToString);
console.log(arg);
}
removeZero(602.23);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment