Forked from josephdicdican/js_calculate_progress_percentage.js
Created
September 18, 2018 15:31
-
-
Save kevinold/26f1757b05a0e3c4da5492b56b798f0e to your computer and use it in GitHub Desktop.
JS Calculate Progress Percentage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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