-
What are some libraries that you've especially enjoyed working with? Why do you like them? What don't you like about them?
-
What did you learn yesterday/this week? Expand on this. What makes them interested?
-
Leading into... What excites or interests you about coding?
-
What is your opinion of web standards? EMCAScript?
-
Have you implemented accessibility in the context of a heavy client side application?
- What is unique about Javascript's variable scoping? (Bonus points for explaining variable hoisting.)
- 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;
- The
call()
method calls a function with a giventhis
value and arguments provided individually. Implementcall()
.
// 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);
}
- 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;
}
Implement this design. http://codepen.io/TeffenEllis/full/AgoDJ
- How did they implement the logo?
- How did they align the left and right side of the header?
- What styles did they reuse?
- How did they target the elements? Classes, IDs, attributes?
- How did they position elements?
- If they used absolute positioning, can they do it without?
- If they used floats, can they do it without?
- We have a growing front end. We're interested into something more modular. What is their opinion of doing this piecemeal?
- Explain the role and what our plans are. Are they interested?