Last active
          April 1, 2018 03:59 
        
      - 
      
- 
        Save MickeyKay/c61c506e8d1f2dd3104c2839c5db10eb to your computer and use it in GitHub Desktop. 
    Nested for loop example (not so great)
  
        
  
    
      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
    
  
  
    
  | var list = ['some', 'huge', 'array', '...']; | |
| function reverseAndCapitalizeOrLowercase(list) { | |
| list.forEach(function(text) { | |
| // A | |
| // big | |
| // chunk | |
| // of | |
| // code | |
| // that | |
| // alphabetizes | |
| // text | |
| if (text.length > 3) { | |
| // A | |
| // big | |
| // chunk | |
| // of | |
| // code | |
| // that | |
| // capitalizes | |
| // text | |
| } else { | |
| // A | |
| // big | |
| // chunk | |
| // of | |
| // code | |
| // that | |
| // lowercases | |
| // text | |
| } | |
| }); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment