Skip to content

Instantly share code, notes, and snippets.

@josephdicdican
Created January 18, 2017 09:15
Show Gist options
  • Save josephdicdican/1da82179c079a39a8192654ebbbf6070 to your computer and use it in GitHub Desktop.
Save josephdicdican/1da82179c079a39a8192654ebbbf6070 to your computer and use it in GitHub Desktop.
JS Calculate Progress Percentage
var completed = 30;
var target = 30;
var progress = Math.ceil(completed / target * 100);
console.log(progress);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment