I am 32 years. I am very inquisitive and every day I study and learn something new for myself. It makes me happy. I set myself the goal of becoming a Frontend developer and step by step is getting closer to its implementation.
function towelSort(matrix) {
if (!matrix) {
return [];
}
let res = [];
for (let i = 0; i < matrix.length; i++) {
if (i % 2 == 0) {
for (let j = 0; j < matrix[i].length; j++) {
res.push(matrix[i][j]);
}
}
else {
for (let j = matrix[i].length - 1; j >= 0; j--) {
res.push(matrix[i][j]);
}
}
}
return res;
}
Projects:
Samara Academy of Culture and art
A2 (School, Academy, Duolingo)