Google array +1 question

by Artem

JavaScript

'use strict';

const input = [1, 2, 3, 4];

const plusOne = (array, _ = +array.slice().join('')) => (++_ + '').split('').map(Number);

console.log(plusOne(input));