Unit 1: Trivia
Rules
- You'll be sorted into groups of 3 or 4
- Come up with a team name
- There are 4 Categories, each with 5 Questions
- Write your answers on a whiteboard
- After each category teams can wager up to 5 points on a challenge question
The Prize
Free Lunch @ Gather for your team!
Git
What command can you run to see all remote repositories?
Answer: git remote -v
How do you exit vim without saving?
Answer: :q!
What git command let's you see changes since the last commit?
Answer: git diff
How do you run git's interactive staging tool?
That's the one with all the hunks.
Answer: git add -p
What does the -u flag represent when pushing?
Answer: upstream
What command do you need to run to remove a local git repository?
Answer: rm -rf .git
CHALLENGE:
CSS
How many columns is the grid system in Bootstrap?
Answer: 12
Write a selector that only selects sections with a class of both "alert" and "alert-info".
Answer: section.alert.alert-info { ... }
If the html element has a font-size of 18px, what does 2.5rem represent?
Answer: 45px
Which of the following is the most specific:
element, inline, id
Answer: inline
Write a selector that will grab an input field with an attribute of "data-id" and value of "13".
Answer: input[data-id="13"] { ... }
What are the five CSS position values?
Answer: static, absolute, fixed, relative, sticky
CHALLENGE:
HTTP & AJAX
What does AJAX stand for?
Answer: Asynchronous JavaScript & XML
What does the 201 status code stand for?
Answer: Created
What does the 404 status code stand for?
Answer: Not Found
What are the four
HTTP verbs?
Answer: GET, POST, PUT, DELETE
What does CORS stand for?
Answer: Cross Origin Resource Sharing
What will be logged?
Answer: OK!!!
CHALLENGE:
new Promise(function (fn1, fn2) {
( "3" == 3 ) ? fn2('OK') : fn1('OK');
}).then(function (result) {
console.log(result + '???');
}, function (result) {
console.log(result + '!!!');
});
JavaScript
What will this evaluate to?
Answer: false
( !true || !!0 ) ||
( !1 && !!!1 ) ||
( false || true && false )
What will this evaluate to?
Answer: undefined
[
[ 3, 4, 5 ][ 0 ],
[
"a",
"b",
"c",
[ "d", "e", "f" ][ 2 ]
][ 5 ]
][ 1 ]
The final value of movie is:
Answer: Party-Girl
var movie = 'Party Girl';
if ( movie.indexOf('P') > 0 ) { movie = movie.split(" ")[0]; }
if ( movie.length > 5 ) { movie = movie.replace(" ", "-"); }
movie.toLowerCase();
Answer: 35
function crazyHoF (input1) {
return function (input2) {
input1 += input2;
return function (input3) {
return input1 + input3 + input2;
}
}
}
crazyHoF(10)(5)(15);
What will this evaluate to?
Answer: 0
Object.keys([ 10, 11, 12 ]).reduce(function (prev, curr) {
return prev * curr;
});
What will this evaluate to?
Answer: '7-7-5-5-5-3-3-3-3'
[ 9, 77, 555, 3333 ].map(function (el) {
return el.toString().split('').join('-');
}).filter(function (el) {
return el.indexOf('-') > -1;
}).reduce(function (prev, curr) {
return [prev, curr].join('-');
});
What will this evaluate to?
CHALLENGE:
Unit 1 Trivia
By Wes Reid
Unit 1 Trivia
- 602