- Fork this repo
- Clone your fork
- Fill in your answers by writing in the appropriate area, or placing an 'x' in the square brackets (for multiple-choice questions).
- Add/Commit/Push your changes to Github.
- Open a pull request.
Describe the purpose of a clearfix in CSS, and give an example of how to do it.
Your Answer:
What does the following selector do? ul.dropdown > li
?
Select 1:
[] Selects all li's which are directly inside a ul of class dropdown (children)
[] Selects all li's which are anywhere inside a ul of class dropdown (any descendant)
[] Selects all ul's of class dropdown, as well as the children elements that are li's
[] Selects all ul's of class dropdown, only if their children are exclusively li's
Describe the rules of scope in JavaScript.
Your Answer:
Define an object and store it in a variable pizza
. The object should have 2
properties: a temperature (set to 70), and a method called bake
. When called,
this method should set the pizza's temperature to be 300. Note: you may not use
the variable pizza inside your method.
Your Answer:
// write code here
Define a function called doSomething
. It should take one argument, called
thingToDo
. When called, doSomething
should invoke the function given as an
argument. Finally, demonstrate calling doSomething
with a function.
Your Answer:
// write code here
What is the difference between synchronous and asynchronous program execution?
Select all that apply:
[] Synchronous code runs at an even pace, asynchronous code runs with uneven pacing.
[] Synchronous code runs all at the same time, asynchronous code runs completely randomly
[] Synchronous code runs in order (as appears in the source), asynchronous code may run at a later time.
Which of the following represents a correct workflow for submitting a PR on a non-master branch? (ignore the lack of commit messages)
Select 1:
[] fork on github; git clone <fork_url>; git checkout -b <charlie_solution>; git add <files>; git commit; git push; create pull request
[] fork on github; git clone <ga_dc_url>; git checkout -b <charlie_solution>; git add <files>; git commit; git push; create pull request
[] git clone <ga_dc_url>; git branch <charlie_solution>; git add <files>; git commit; git push; create pull request
[] fork on github; git clone <fork_url>; git checkout -b <charlie_solution>; git add <files>; git commit; git pull; create pull request
Which of the following statements will work, assuming jQuery is loaded?
Select all that apply:
[] `$(".post").css("background", "peachpuff")`
[] `$(".post").innerHTML`
[] `$(".post").html()`
[] `document.getElementsByClassName("post")[0].innerHTML`
[] `document.getElementsByClassName("post").innerHTML`
Using jQuery, add an event listener for clicks on the button with the id 'greeting'. When the event happens, the code should append a paragraph to the body, that says "hello".
Your Answer:
// your code here
Create a repo for project 1. (You don't need to fork, just create a brand new repo).
Create a readme.md in that repo. In the readme, write out five (5) user stories for your first project. Be sure to include a role, goal, and reason for each.
Finally, link to your repo on github in the space below.
Your Answer: