Created
          July 24, 2021 19:45 
        
      - 
      
- 
        Save alibalbars/dfc4a1a96c6553e4b8e4f8928446c734 to your computer and use it in GitHub Desktop. 
    Sorting string elements with JavaScript
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | const months = ['March', 'Jan', 'Feb', 'Dec']; | |
| months.sort(); | |
| console.log(months); | |
| // expected output: Array ["Dec", "Feb", "Jan", "March"] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment