-
-
Save trtpg/20ec1edcc5ed13d298fb7192abaedc75 to your computer and use it in GitHub Desktop.
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
var answers = [ | |
"Yes", | |
"No", | |
"It was the tofu", | |
"Call your mom", | |
"IDK" | |
]; | |
function shakeEightBall () { | |
var rando = Math.floor(Math.random() * 5); | |
var fortune = answers[rando]; | |
if (fortune) { | |
console.log(fortune); | |
} else { | |
console.log("Ask again"); | |
} | |
} |
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
var cart1 = [ | |
{ name: "fanciest jacket", price: 17.99 }, | |
{ name: "not so fancy coat", price: 5.99 }, | |
{ name: "golden tap shoes", price: 59.85 }, | |
{ name: "doggles (google it)", price: 17.44 }, | |
{ nane: "+2 argyle socks of cunning", price: 31.99 } | |
]; | |
var cart2 = [ | |
{ name: "lonely glove", price: 0.01 } | |
]; | |
function total (list) { | |
} |
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
var int = 99; | |
function addItUp(paramNum) { | |
paramNum = paramNum + 12; | |
console.log("Output is " + paramNum); | |
} | |
addItUp(int); | |
console.log(int); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment