Simple Direct JavaScript Solution
var plusOne = function(digits) {\n    for(var i = digits.length - 1; i >= 0; i--){\n         digits[i]++; \n        if(digits[i] > 9){\n            digits[i] = 
    var plusOne = function(digits) {\n    for(var i = digits.length - 1; i >= 0; i--){\n         digits[i]++; \n        if(digits[i] > 9){\n            digits[i] = 0;\n        }else{\n            return digits;\n        }\n    }\n    digits.unshift(1);\n    return digits;\n    };\n\n\nFirst, I add 1 anyway. If there is a carry-over, the new digit will also add 1. If the current digit is less than 9 then return the array. \n\nLast, when running over for loop, I just put fill 1 in front of the array.
['JavaScript']