Created
January 22, 2015 02:30
-
-
Save ZucchiniZe/3e6aa8a0fe9eb65583c0 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 middleWay(a, b) { | |
| if(a.length % 2 !== 0 && b.length % 2 !== 0) { | |
| return [a[Math.floor(a.length/2)], b[Math.floor(b.length/2)]]; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment