Created
August 6, 2015 04:53
-
-
Save linagee/5bc1f9b33f7e20bef5f9 to your computer and use it in GitHub Desktop.
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 start = 5000; | |
var end = 21000; | |
var position = 5072; | |
var percentThere = (position-start)/(end-start); | |
var count = 300; | |
var mark = percentThere * count; | |
var a = "["; | |
for (var x = 0; x <= count; x++) { | |
if (x < mark) { | |
a += "*" | |
} else { | |
a += "-"; | |
} | |
} | |
a += "]"; | |
console.log(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment