Created
October 23, 2017 13:25
-
-
Save epzee/4869f99c96f21bfd6570313cf3525210 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
function doubleSize(a, b) { | |
let max = b; | |
a.sort().forEach(item => { | |
if (item === max) { | |
max = max * 2; | |
} | |
}) | |
return max; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment