Created
December 11, 2017 04:21
-
-
Save SebGogo/a032f0f4ebe82e6a82cd55a3c6a07414 to your computer and use it in GitHub Desktop.
Function Declarations
This file contains 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
// Declaring function with keyword 'function', function's name, ()'s holding two parameters, and {} body | |
function isGreaterThan (numberOne, numberTwo) { | |
// Conditional statement to see if parameter1 is greater than parameter2 | |
if (numberOne > numberTwo) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
// Calling function isGreaterThan with different arguments | |
console.log(isGreaterThan(1, 2)); | |
console.log(isGreaterThan(2, 1)); | |
console.log(isGreaterThan(2, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment