JSFiddle - React, Tailwind, and code Playground

by salt

JavaScript

let input = 1801;
let arr = []
for(let i=0;i<2;i++){
    arr.push(0)
    if(input>=360){
        arr.push(360)
        input-=360
    }
}
arr.push(input)
console.log(arr)