How to check if an array of string is sorted Ascending/Descending alphabetically?

how to check if an array is sorted ascending or descending alphabetically or unsorted
e.g [“apple”,”summer”,”sun”,”zoo”] in js