Created
May 16, 2020 14:02
-
-
Save nomyfan/4ee6d61ad0ed03e7981a3a95623123f2 to your computer and use it in GitHub Desktop.
JS zip iteration adapter
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
Array.prototype.zip = function(ano) { | |
return [...Array(Math.min(this.length, ano.length))].map((_, i) => [this[i], ano[i]]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment