Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <title>file Size Unit Calculator</title>
- <div>Expected value: <b>269MB</b></div>
- <div>Actual value: <b id="ret"></b></div>
- <script>
- var fileSizeUnits = function(a,c){for(;a>>10;c=-~c)a>>=10;return a+(" kMGT"[c]||"")+"B"}
- document.getElementById( "ret" ).innerHTML = fileSizeUnits(282630144)
- </script>
Add Comment
Please, Sign In to add comment