const chunk = (a, n) => if(a.length>1) {return [...Array(Math.ceil(a.length / n))].map((_, i) => a.slice(n * i, n + n * i))} else {return a} ;
console.log(chunk([0], 2));
function setBorder(swiper) {
if (document.documentElement.clientWidth >=980) {
//code
}
}