#[0] convert the following line of code from python to javascript. `[line[i:i+n] for i in range(0, len(line), n)]`

Reply to this note

Please Login to reply.

Discussion

let result = [];

for (let i = 0; i < line.length; i += n) {

result.push(line.slice(i, i + n));

}