Created
January 21, 2014 16:16
-
-
Save laurengoods/8543068 to your computer and use it in GitHub Desktop.
Codeacademy javascript tutorial: functions and if else statements
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
// Write your function below. | |
// Don't forget to call your function! | |
var creditCheck = function(income) | |
{ if (income >= 100) { | |
return("You earn a lot of money! You qualify for a credit card"); | |
} else { | |
return("Alas you do not qualify for a credit card. Capitalism is cruel like that"); | |
} }; | |
console.log(creditCheck(75)); | |
console.log(creditCheck(125)); | |
console.log(creditCheck(100)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could also do