var arr = [[1, 5], [10, 15], [21, 25]], tmp = []; arr.forEach(function (el, i) { var next = arr[i + 1], val = next ? next : arr[0]; tmp.push([el[1], val[0]]); }) JSON.stringify(tmp);
window.devicePixelRatio zoom