I have this array:
var array1 = ['9/2022','7/2020','11/2021','12/2020','2/2020','4/2021','10/2021'];
How can I get the years from it in order? So the result would be this:
result = ['2020','2021','2022'];
Do I have to change the array to a new Date() format and sort, or how would be the best way ? Any Suggestion ?