Push on 2d array

by Sebastian Kay

JavaScript

function sumAll(a,b) {
		return (a == b)? a : ((b - a)+1)*(a+b)/2;
}

console.log(sumAll(0,-1));