Add solution for matrix region sum in js.