function sliceArray(arr,num){
let newArr=[]
for (var i = 0; i < arr.length; i+=num) {
if(arr.length>=(i+num)) {
newArr.push(arr.slice(i,i+num).join("|"))
}else{
newArr.push(arr.slice(i).join("|"))
}
}
return newArr;
}
```js