Javacript merge array if there is duplicate value
<p>var arr = [[7, 50], [7, 60], [8, 40]];</p>

<p>how to merge this array to become the result like this ?
[[7, 110], [8,40]];</p>

<p>lets say if i have over hundreds of these smaller arrays wrapped by an array</p>
