Skip to content

Commit 6f6a88f

Browse files
authored
traduccion
1 parent 75411f8 commit 6f6a88f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • 4-binary/01-arraybuffer-binary-arrays/01-concat/_js.view

4-binary/01-arraybuffer-binary-arrays/01-concat/_js.view/solution.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
function concat(arrays) {
2-
// sum of individual array lengths
2+
// suma de las longitudes de array individuales
33
let totalLength = arrays.reduce((acc, value) => acc + value.length, 0);
44

55
if (!arrays.length) return null;
66

77
let result = new Uint8Array(totalLength);
88

9-
// for each array - copy it over result
10-
// next array is copied right after the previous one
9+
// para cada array: copiarlo sobre "result"
10+
// el siguiente array es copiado justo después del anterior
1111
let length = 0;
1212
for(let array of arrays) {
1313
result.set(array, length);

0 commit comments

Comments
 (0)