Knowledge!
And a Udemy course of $10 or less
Answer: SELECT id, name FROM pets;
Answer: SELECT * FROM students ORDER BY age DESC LIMIT 1;
Answer: Success: false
Promise.resolve(false)
.then(result => {
console.log('Success:', result)
})
.catch(error => {
console.log('Error:', error)
})
Answer: glass
knex('cocktails')
.join('glasses',
'glasses.id',
'cocktails.glass_id')
.then(results => {
console.log(results[0].id)
})
Answer: The server will likely respond with undefined.
CHALLENGE:
router.get('/languages/:id', (req, res) => {
let language
knex('languages').where({ id: req.params.id })
.then(languages => {
language = languages[0]
})
res.send(language)
})
Answer: Angular, Ember, React, Vue, Knockout, Backbone...
Answer: builtin directives
Answer: $valid, $invalid, $pristine, $touched, $error, $submitted, $pending
Answer: Modifies the prefix for your SPA routes
Answer:
< is for one-way binding
= is for two-way binding
@ is for one-way binding with strings
& is for passing functions
CHALLENGE:
Answer: O(n^3)
Answer: O(n^2)
Answer: Anything that does not have a reference to it
Answer: Insertions in Linked Lists are O(1) in the worst case scenario
Answer: O(log n) for all of them
CHALLENGE:
Answer: [:magic]
["ruby", :magic, 42].reject do |w|
w.class != Symbol
end
Answer: {"big": "foot", "loch": "ness"}
def keyword_args(**kwargs):
return kwargs
keyword_args(big="foot", loch="ness")
Answer: [ 0, 1, 2, 3, 4, 5 ]
0 :: List.range 1 5
Answer: Hello world!
CHALLENGE:
Answer: 30
(defn someFn [x y]
(+ (+ x x) (+ y y)))
(someFn 5 10)