#[0] convert the following line of code from python to javascript. `[line[i:i+n] for i in range(0, len(line), n)]`
Please Login to reply.
let result = [];
for (let i = 0; i < line.length; i += n) {
result.push(line.slice(i, i + n));
}