Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
7
test/zip/zip.js
Normal file
7
test/zip/zip.js
Normal file
@ -0,0 +1,7 @@
|
||||
const zip = (...arrays) => {
|
||||
const maxLength = Math.max(...arrays.map(x => x.length));
|
||||
return Array.from({ length: maxLength }).map((_, i) => {
|
||||
return Array.from({ length: arrays.length }, (_, k) => arrays[k][i]);
|
||||
|
||||
};
|
||||
module.exports = zip;
|
||||
Reference in New Issue
Block a user