1const arr = [22, 46];
2const properToMixed = arr => {
3 const quotient = Math.floor(arr[0] / arr[1]);
4 const remainder = arr[0] % arr[1];
5 if(remainder === 0){
6 return [quotient];
7 }else{
8 return [quotient, remainder, arr[1]];
9 };
10};
11console.log(properToMixed(arr));