Skip to content

Instantly share code, notes, and snippets.

@isaacs
Created July 8, 2010 17:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/468360 to your computer and use it in GitHub Desktop.
Save isaacs/468360 to your computer and use it in GitHub Desktop.
1. Write a function that will create and return a simple
write-once data object. The object should have a set(key,
val) and get(key). Setting a key a second time throws an
error. The internal state should not be visible to the
consumer.
1a. Use ES5.
1b. Don't use ES5, so that it works in IE.
2. You have a web form with two options, "yes" and "no". Only
one can be selected at a time. If the user selects "no", then
you should show them a warning. if they select "yes", then
the warning should go away. Explain the various choices.
2a. The warning is created on the server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment