Clean JavaScript Solution
\n// time O(n^2) space O(1)\nvar maxPower = function(s) {\n    let max = 1\n    let count = 1\n    \n    for(let i=0; i<s.length - 1; i++) {\n        if(s[i] ==
```\n// time O(n^2) space O(1)\nvar maxPower = function(s) {\n    let max = 1\n    let count = 1\n    \n    for(let i=0; i<s.length - 1; i++) {\n        if(s[i] === s[i+1]) {\n            count++\n            max = Math.max(count, max)\n        } else {\n            count = 1\n        }\n    }\n    \n    return max\n};\n```\n
['JavaScript']