type objectTest = {
name: string,
phone: number
}
const testArr: objectTest[] = [{name:"jono", phone:08177777},{name:"joni", phone:081888888},{name:"jona", phone:081999999},{name:"jonu", phone:081666666}];
function paginateArr<T>(arr:T[], skip:number, limit:number):T[]{
return arr.slice(skip, limit+skip);
}
console.log('Real Arr =>', testArr);
console.log(paginateArr(testArr,2,2));