问题 I have an array. The array can contain 1 to 7 unique strings of day names. The day names will be in order from Mon to Sun. - eg: ["Tue", "Thu", "Sun"] I want to use javascript to sort that array so that the order will be beginning with today. ie: if today is Friday, then the sorted array should be ["Sun", "Tue", "Thu"] if today is Thursday then the sorted array should be ["Thu", "Sun", "Tue"] Can anyone help? 回答1: function sort_days(days) { To get today's day of week, use new Date().getDay()