I hereby claim:
- I am jimmyhsu on github.
- I am jimmyhsu (https://keybase.io/jimmyhsu) on keybase.
- I have a public key ASDtYmSDZOEKiJl07A3I7vPgZN37VV-2q53PO6MclToNOwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
@IBAction func calculateTip(_ sender: Any) { | |
guard let billAmount = Double(billAmountField.text!) else { | |
//show error | |
billAmountField.text = "" | |
tipAmountField.text = "" | |
totalAmountField.text = "" | |
return | |
} | |
var tipPercentage = 0.0 |
// NOTES: Prototypical Inheritance | |
// REQUIRE: lodash/underscore | |
// FUNCTION: Find all the peaks in a given array. | |
// USE: [1,2,3,2,1].findPeaks(); | |
// INPUT: context/this | |
// RETURN: index, peak/value within array | |
// EX: [2,5] | |
// ERROR: false |