One line js solution with full explanation, beginner-friendly
\n# Approach\nAs we are told we are given a large integer represented as an integer array. So we should use the BigInt type. Our first work is joining the numbe
\n# Approach\nAs we are told we are given a large integer represented as an integer array. So we should use the BigInt type. Our first work is joining the numbers using join() method and of course we wrap it in BigInt and add BigInt(1). Because we can\'t add regular number to bigInt, this is why we are using the bigInt type for 1 too. And we convert the BigInt to a string and split() it\n\n# Complexity\n- Time complexity:\nRuntime: 65 ms\nBeats 74.99%\n\n\n- Space complexity:\nMemor: 41.7 MB\nBeats 81.73%\n\n# Code\n```\n/**\n * @param {number[]} digits\n * @return {number[]}\n */\nvar plusOne = function(digits) {\n    return (BigInt(digits.join("")) + BigInt(1)).toString().split("");\n};\n```
['JavaScript']