Knowledge!
And a Udemy course of $10 or less
Answer: git remote -v
Answer: :q!
Answer: git diff
Answer: git checkout -b [branch name]
Answer: upstream
Answer: rm -rf .git
CHALLENGE:
Answer: false
( !true || !!0 ) ||
( !1 && !!!1 ) ||
( false || true && false )
Answer: undefined
[
[ 3, 4, 5 ][ 0 ],
[
"a",
"b",
"c",
[ "d", "e", "f" ][ 2 ]
][ 5 ]
][ 1 ]
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);
Answer: 0
Object.keys([ 10, 11, 12 ]).reduce(function (prev, curr) {
return prev * curr;
});
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('-');
});
CHALLENGE:
Answer: function and object, respectively
GET /animals
POST /animals/:id
DELETE /animals/delete
PUT /animals/:id
Answer: GET and PUT
Answer: POST /animals
Answer: res.send or res.json
Answer: Representational State Transfer
Answer: Server responds telling the client to make another request to a new URL. On that second request, a page is rendered.
CHALLENGE:
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: nothing
Promise.all([
Promise.resolve(true),
Promise.reject(false)
])
.then(result => {
console.log(result)
})
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: Authentication checks for if you are who you say you are. Authorization is about what you can do.
Answer: 401
Answer: This tells the client to not allow this cookie to be accessed by the client's JavaScript code.
Answer: Always use slow hashing algorithms like bcrypt instead of fast hashing algorithms like md5.
Answer: It signs (encodes) the session content so that it is secure.
CHALLENGE:
Answer: Encryption implies that there's decryption. With cryptographic hashing, it should be a one-way process.
Answer: O(log n)
Thanks, Ben!
Answer: KeePass, One Password, Last Pass
Thanks, Joshua!
Answer: (various)
Thanks, Betty!
Answer: (various)
Thanks, Stefan!
Answer: B
Thanks, Cheryln!
A. Over 60%
B. Over 70%
C. Over 80%
D. Over 90%
CHALLENGE:
Answer: naturesoundsfor.me
Thanks, Alyssa!