495 Teemo Attacking Javascript solution
\n\nvar findPoisonedDuration = function(timeSeries, duration) {\n    if (timeSeries.length === 0 ) return 0; \n    let res = duration;\n    for (let i = 1; i < 
```\n\nvar findPoisonedDuration = function(timeSeries, duration) {\n    if (timeSeries.length === 0 ) return 0; \n    let res = duration;\n    for (let i = 1; i < timeSeries.length; i++) {\n            res += Math.min(timeSeries[i] - timeSeries[i - 1], duration);\n    }\n    return res; \n};\n```
['JavaScript']