javascript 112ms
\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar waysToSplitArray = function(nums) {\n    let result = 0;\n    let letsum = 0;\n    let rightsum 
```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar waysToSplitArray = function(nums) {\n    let result = 0;\n    let letsum = 0;\n    let rightsum = nums.reduce((a,b)=> a+b);\n    let end = nums.length-1;\n    for (let i = 0;i<end;i++) {\n        letsum+=nums[i];\n        rightsum-=nums[i];\n        if (letsum>=rightsum) {\n            result++;\n        }\n    }\n    return result;\n};\n```
['JavaScript']