Created
          March 9, 2018 23:16 
        
      - 
      
 - 
        
Save liseferguson/7e8a1520912f69206a838ed294c5f6b8 to your computer and use it in GitHub Desktop.  
    wisePerson generator
  
        
  
    
      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
    
  
  
    
  | function wisePerson(wiseType, whatToSay) { | |
| return `A wise ${wiseType} once said: "${whatToSay}".`; | |
| } | |
| // tests | |
| function testWisePerson() { | |
| const wiseType = 'goat'; | |
| const whatToSay = 'hello world'; | |
| const expected = 'A wise ' + wiseType + ' once said: "' + whatToSay + '".'; | |
| const actual = wisePerson(wiseType, whatToSay); | |
| if (expected === actual) { | |
| console.log('SUCCESS: `wisePerson` is working'); | |
| } else { | |
| console.log('FAILURE: `wisePerson` is not working'); | |
| } | |
| } | |
| testWisePerson(); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment