How to sort this? For example i want that my first day of week will be Monday. From this:
Sun Mon Tue Wed Thu Fri Sat
i want this:
Mon Tue Wed Thu Fri Sat Sun
or i want that my first day of week will be Friday
then in output should be this:
Fri Sat Sun Mon Tue Wed Thu
let days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] //by default first day of week is 0
let firstDayOfWeek = 1 //Mon
days = days.map(m=>{
//how i can sort this?
return m
})