let data=[],dateInt=[];
let start=0,end=23*60+59;
let appointments=[[340,550],[920,1230]];
Array(24*4).fill(0).forEach(x=>
{
dateInt.push(start)
start=start+15
});
function getTime(num){
let temp=String(Math.trunc(num/60));
let tempHour=temp+"".length===1?"0"+temp:temp;
let tempmin=num%60===0?"00":num%60;
return {asInt:num,asString:tempHour+":"+tempmin};
}
// let res=appointments.map(x=>dateInt.filter(y=>y<x[0]).concat(dateInt.filter(y=>y>=x[1])) )
let res2=appointments.reduce(( acc, x )=>{
return acc.filter(y=>y<x[0]).concat(acc.filter(y=>y>=x[1]));
},dateInt )
console.log(res2)