Skip to content

Instantly share code, notes, and snippets.

@GirlBossRush
Last active August 29, 2015 14:04
Show Gist options
  • Save GirlBossRush/ddac8f65d9103b2a0903 to your computer and use it in GitHub Desktop.
Save GirlBossRush/ddac8f65d9103b2a0903 to your computer and use it in GitHub Desktop.

Warm up.

  1. What are some libraries that you've especially enjoyed working with? Why do you like them? What don't you like about them?

  2. What did you learn yesterday/this week? Expand on this. What makes them interested?

  3. Leading into... What excites or interests you about coding?

  4. What is your opinion of web standards? EMCAScript?

  5. Have you implemented accessibility in the context of a heavy client side application?

Javascript

  1. What is unique about Javascript's variable scoping? (Bonus points for explaining variable hoisting.)
  2. Write a solution to output the following:
var myDog = new Dog("Rex"),
    myCat = new Cat("Mittens");

myDog.speak() // "Woof!"
myDog.info() // "Woof! I'm Rex the dog."

myCat.speak() // "Meow!"
myCat.info() // "Meow! I'm Mittens the cat."
// Answer.
function Animal() {
  this.speak = function () {
     return this.cry;
  };

  this.info = function () {
    var message = this.speak() + " I'm " + this + ".";

    return message;
  };

  this.toString = function () {
    return this.name + " the " + this.type;
  };
}

function Dog(name) {
  this.name = name;
  this.type = "dog";
  this.cry  = "Woof!";
}

Dog.prototype = new Animal;

function Cat(name) {
  this.name = name;
  this.type = "cat";
  this.cry  = "Meow!"
}

Cat.prototype = new Animal;
  1. The call() method calls a function with a given this value and arguments provided individually. Implement call().
// Answer.
Function.prototype.call = function (context) {
  // Convert arguments into array.
  var args = [];
  args.push.apply(args, arguments);

  // Remove context.
  args.shift();

  return this.apply(context, args);
}
  1. Create a function that outputs the following:
var myDog = new Dog("Rex"),
    myCat = new Cat("Mittens");

meetingWith(myDog, myCat); // We're meeting with Rex the dog, and Mittens the cat
// Answer.
meetingWith = function () {
  var args = Array.prototype.slice.call(arguments, 0),
    message = "We're meeting with ";

  args.forEach(function (name, i) {
    if (i !== 0) {
      message += (i < args.length - 1 ? ", " : ", and ")
    }

    message += name;
  });

  return message;
}

CSS

Implement this design. http://codepen.io/TeffenEllis/full/AgoDJ

  1. How did they implement the logo?
  2. How did they align the left and right side of the header?
  3. What styles did they reuse?
  4. How did they target the elements? Classes, IDs, attributes?
  5. How did they position elements?
  6. If they used absolute positioning, can they do it without?
  7. If they used floats, can they do it without?

Wrap up

  1. We have a growing front end. We're interested into something more modular. What is their opinion of doing this piecemeal?
  2. Explain the role and what our plans are. Are they interested?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment