drboolean
mostly-adequate-guide (old)

Updated a year ago

Tyler Reitz (@tyler-reitz) started discussion #205

a year ago · 0 comments

Open

Had we not surrounded its guts in another function, getFromStorage would vary its output depending on external circumstance. With the sturdy wrapper in place, we will always get the same output per input: a function that, when called, will retrieve a particular item from localStorage. And just like that (maybe throw in a few Hail Mary's) we've cleared our conscience and all is forgiven.

Chapter 8: Tupperware (Edit this file)

How does `var getFromStorage = function(key) { return localStorage[key] }` vary it's ouput depending on external circumstances? Wouldn't it always return the same key from localStorage just like its wrapped counterpart?

No description provided.

No comments on this discussion.


to join this conversation on GitBook. Already have an account? Sign in to comment
Notifications

You’re not receiving notifications from this thread.


1 participant