function solution(dots) {
let width = Math.max(...dots.map(dot => dot[0])) - Math.min(...dots.map(dot => dot[0]));
let height = Math.max(...dots.map(dot => dot[1])) - Math.min(...dots.map(dot => dot[1]));
return width * height;
}
function solution(dots) {
const x = dots.map(n => n[0]);
const y = dots.map(n => n[1]);
return (Math.max(...x) - Math.min(...x)) * (Math.max(...y) - Math.min(...y))
}