Skip to content

Instantly share code, notes, and snippets.

View zailleh's full-sized avatar

Tim Caldwell zailleh

View GitHub Profile
def addition_function # declare this outside of the case and loop so we can call it repeatedly
puts "Which numbers would you like to add?"
n1 = gets.chomp.to_i
n2 = gets.chomp.to_i
answer = n1 + n2
puts "The sum is: #{answer}"
end
def show_menu
puts "Calculator"
@zailleh
zailleh / atm.js
Last active June 24, 2018 09:04 — forked from ellijayne/atm bank js
atm bank html
$(document).ready(function() {
const balance = {
savings: 0,
checking: 0
};
//CHANGING COLOR ON $0...
const zeroBalance = function() {
if (balance['savings'] === 0) {
// sum shopping cart items js
// shopping cart object
const cartForParty = {
banana: "1.25",
handkerchief: ".99",
Tshirt: "25.01",
apple: "0.60",
nalgene: "10.34",
proteinShake: "22.36"