Answers
Q1: Answer
1.True
2.False
foo1 returns:
Object {bar: "hello"}
foo2 returns:
undefined
Q2: Answer
Q2 Bonus Answer:
When the line containing the return statement (with nothing else on the line) is encountered in foo2(), a semicolon is automatically inserted immediately after the return statement.
No error is thrown since the remainder of the code is perfectly valid, even though it doesn’t ever get invoked or do anything (it is simply an unused code block that defines a property bar which is equal to the string "hello").
Q3: Answer
You can't be sure, JavaScript's floating point numbers lead to odd results
Q4: Answer
object
Q5: Answer
Up to 6
Q6: Answer
Linus Torvalds
Bonus: Finland
Q7: Answer
Prototypal inheritance (OO)
Functional Programming
Q8: Answer
Q9: Answer
Limit it to 2000
Q10: Answer
ng-show/ng-hide will always insert the dom element.
Q11: Answer
Changing .directive to .component to adapt to the new Angular 1.5 components
Q12: Answer
The first one.
jQuery is built on top of JavaScript and uses its methods under the hood to make DOM manipulation easier, at the cost of some performance overhead.
Q13: Answer
Purple
Q14: Answer
Answer: knex('cities').where('population', 5000000).update({name: 'Denver'})
Q15: Answer
document.querySelectorAll('.kitten');
Q16: Answer
Q17: Answer
SELECT first_name AS 'First Name', last_name AS 'Last Name' FROM Users;
Q18: Answer
SELECT first_name AS 'First Name', last_name AS 'Last Name', title AS 'Title' FROM users JOIN sports_teams ON users.id = sports_teams.user_id WHERE title = 'manager';