Created
February 13, 2018 13:19
-
-
Save AppMkrATL/a4fad73aa9aa26a1168d426c179a9e88 to your computer and use it in GitHub Desktop.
String drills
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 add(num1, num2) { | |
return num1 + num2; | |
} | |
function subtract(num1, num2) { | |
return num1 - num2; | |
} | |
function testAdd() { | |
const num1 = 5; | |
const num2 = 10; | |
const expected = 15; | |
if (add(num1, num2) === expected) { | |
console.log('SUCCESS: `testAdd` is working'); | |
return true; | |
} | |
else { | |
console.log('FAILURE: `testAdd` is not working'); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment