mirror of
https://github.com/Aviortheking/IMIE_CQ.git
synced 2025-06-07 16:29:54 +00:00
Fait
This commit is contained in:
parent
a634564595
commit
ad05c139ed
@ -7,4 +7,8 @@ module.exports = class ApiController {
|
||||
all(req, res) {
|
||||
res.send(this.db.getAll())
|
||||
}
|
||||
|
||||
single(req, res) {
|
||||
res.send(this.db.getByID(req.query.id))
|
||||
}
|
||||
}
|
19
test.js
Normal file
19
test.js
Normal file
@ -0,0 +1,19 @@
|
||||
this.test = 'pouet'
|
||||
|
||||
console.log(this.test) // retourne 'pouet'
|
||||
|
||||
const fn2 = function() {
|
||||
console.log(this.test) // retourne undefined
|
||||
this.pokemon = 'go'
|
||||
}
|
||||
fn2()
|
||||
|
||||
console.log(this.pokemon)
|
||||
|
||||
const fn = () => {
|
||||
console.log(this.test) // retourne 'pouet'
|
||||
this.pokemon = 'go'
|
||||
}
|
||||
fn()
|
||||
|
||||
console.log(this.pokemon)
|
Loading…
x
Reference in New Issue
Block a user