Guest User

Untitled

a guest
Feb 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. function wisePerson(wiseType, whatToSay) {
  2. // your code here
  3. }
  4.  
  5.  
  6. /* From here down, you are not expected to
  7. understand.... for now :)
  8.  
  9.  
  10. Nothing to see here!
  11.  
  12. */
  13.  
  14.  
  15. // tests
  16.  
  17. function testWisePerson() {
  18. var wiseType = 'goat';
  19. var whatToSay = 'hello world';
  20. var expected = 'A wise ' + wiseType + ' once said: "' +
  21. whatToSay + '".';
  22. var actual = wisePerson(wiseType, whatToSay);
  23. if (expected === actual) {
  24. console.log('SUCCESS: `wisePerson` is working');
  25. }
  26. else {
  27. console.log('FAILURE: `wisePerson` is not working');
  28. }
  29. }
  30.  
  31. testWisePerson();
  32.  
  33. function wisePerson () {
  34. var wiseType = 'goat';
  35. var whatToSay = 'hello world';
  36. return wisePerson = 'A wise ' + wiseType + ' once said: "' +
  37. whatToSay + '".';
  38. }
Add Comment
Please, Sign In to add comment