Last active
August 30, 2019 17:05
Star
You must be signed in to star a gist
This demonstrates code that is not "communicating it's needs." To see an example is upfront about it's requirements, check out the solution at: https://gist.github.com/TheCubicleBuddha/c03a1ac37550f8a34df08a3b03915f40
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
function martyrAlgorithm(newUserToSave){ | |
if(!newUserToSave.lastName){ | |
throw new Error("I did my best, but I can't save this new user since you didn't get me a lastName") | |
} | |
globals.databaseHandle.save(newUserToSave); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment