Skip to content

Instantly share code, notes, and snippets.

@trtpg
Forked from jnf/8ball.js
Created May 2, 2017 00:04
Show Gist options
  • Save trtpg/20ec1edcc5ed13d298fb7192abaedc75 to your computer and use it in GitHub Desktop.
Save trtpg/20ec1edcc5ed13d298fb7192abaedc75 to your computer and use it in GitHub Desktop.
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");
}
}
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) {
}
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