title: (javascript) How to sort an array of strings that has seasons and years?
body: <p>The seasons need to be in this order: Spring, Summer, Fall, Winter
  and each season has the year 2025 and 2026.</p>
  <p>All the 2025's need to be with each other and all the 2026's need to be with each other (2025 and 2026 are just examples the years can be anything: 1945, 3005, 7980, etc).</p>
  <p>for example:</p>
  <pre><code>const seasonArr = ['Spring2026',' Spring2025','Summer2026','Summer2025','Fall2025','Fall2026','Winter2026','Winter2025']
  
  let sortedArr = []
  
  const someFunction = () =&gt; {
     ...
  }
  
  someFunction(seasonArr) // output: sortedArr = ['Spring2025', 'Summer2025', 'Fall2025', 'Winter2025', 'Spring2026', 'Summer2026', 'Fall2026', 'Winter2026']
  </code></pre>
  <p>I know I probably have to compare the years but since they're strings I'm struggling to compare just the numbers.</p>
  <p>this is something that I thought of:</p>
  <pre><code>const seasonArr = ['Spring2026',' Spring2025','Summer2026','Summer2025','Fall2025','Fall2026','Winter2026','Winter2025']
  
  let sortedArr = []
  
  const someFunction = (seasonArr) =&gt; {
     for (const season of seasonArr) {
       let year = season.split(/([0-9]+)/)
       // unsure where to go from here
     }
  }
  
  someFunction(seasonArr)
  </code></pre>