Skip to content
Advertisement

PHP format bytes translation to Javascript

Not really a question but kind of a challenge..

I have this PHP function that I always use and now I need it in Javascript.

JavaScript

EDIT: Thanks to the replies I came up with something shorter, but without precision (let me know if you have some second thoughts)

JavaScript

Advertisement

Answer

Tested:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement