Javascript sort an array of strings that containing numbers

I’m trying to sort an array of string that sometimes contain numbers.

Here are examples of the array potentially received and the expected result:

  • [“12W”, “60W”, “25W”] -> [“12W”,”25W”,”60W”]
  • [“IP67”, “IP68”, “IP20”] -> [“IP20″,”IP67″,”IP68”]
  • [“White”, “Red”, “Black”] -> [“Black”, “Red”, “White”]
  • [“100cm”, “10cm”, “50cm”] -> [“10cm”,”50cm”,”100cm”]
  • [“3000°K”, “2700°K”, “2000°K”] -> [“2000°K”,”2700°K”,”3000°K”]

Thanks in advance for your help.