This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.postAddVehicle = ({ body }, res, next) => { | |
const car = new Car(body) | |
console.log(car) | |
return car | |
.save() | |
.then(() => { | |
res.redirect('/'); | |
}) | |
.catch(err => console.log(err)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": "eslint:recommended", | |
"globals": { | |
"Atomics": "readonly", | |
"SharedArrayBuffer": "readonly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getPositions = chatLog => { | |
return chatLog.map((message, i) => { | |
const previous = chatLog[i - 1]; | |
const next = chatLog[i + 1]; | |
const messageIsJoinOrExit = message.messageType === "JOIN_OR_EXIT"; | |
let previousIsJoinOrExit; | |
let nextIsJoinOrExit; | |
let previousIsFromSameUserAsMessage; | |
let nextIsfromSameUserAsMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |