Last active
February 26, 2018 03:41
-
-
Save FagnerMartinsBrack/28396275f93bc77582d2c9d6adf7756d to your computer and use it in GitHub Desktop.
(Medium) - Web Performance
This file contains 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
function byteReduction({ from, to }) { | |
const difference = to - from; | |
return (100 * difference / from) + '%'; | |
} | |
console.log('Is this working?', byteReduction({ from: 100, to: 50 }) === '-50%'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment