Skip to content

Instantly share code, notes, and snippets.

@michaeljacobdavis
Last active August 29, 2015 14:19
Show Gist options
  • Save michaeljacobdavis/218f8d47c2b6f10db4b9 to your computer and use it in GitHub Desktop.
Save michaeljacobdavis/218f8d47c2b6f10db4b9 to your computer and use it in GitHub Desktop.
Questions

Questions

  1. How good are you at foosball?
  2. What developer tools do you use and what are some things you like about them?
  3. Walk me through a Cross site scripting attack? Cross site request forgery?
  4. NPM? How does node resolve dependencies? require('foo');
  5. Walk me through binding a model to a text input?
  6. How do you learn a library?
  7. Whats the most recent one you've tried?

Client

How would you impose namespacing in CSS so that one person's stylesheet don't contaminate rest of the page?

If I wanted a different size font based on the size of the window. How would you do it? What about to scale based on the window size?

Patterns

What are some design patterns you use day to day?

What is the revealing module pattern? Benefits? Cons?

Scope

  1. How do you emulate a private member in a JavaScript function?

function Foo(){ var bar = 'bar'; }

var foo = new Foo();

console.log(foo.bar)

  1. What will this output
  2. Make this output bar
  3. Why does this work?
  4. If I didn't use new would it still work?
  5. Where does bar go without new?

Foo.prototype.bar = 'baz';

Other

var foo = { bar: function () { return this.baz; }, baz: 'baz' };

foo.bar();

var a = foo.bar;

a();

If you wanted to pass all the arguments from a function to another. What's an easy way of doing it?

Async

var asyncFunc = function(){ get('http://google.com', function(err){ throw err; }); };

try { asyncFunc(); } catch (e){ console.log(e); }

Unit Testing

Two inputs [ ] [ ]

How would you build a calculator? How would you unit test the calculator?

{ add: .. subtract: ... multiply: .. divide: ... }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment