first comit
This commit is contained in:
12
corrections/38-es6-classes.js
Normal file
12
corrections/38-es6-classes.js
Normal file
@@ -0,0 +1,12 @@
|
||||
class Animal {
|
||||
constructor(nom) {
|
||||
this.nom = nom;
|
||||
}
|
||||
|
||||
crier() {
|
||||
console.log(`${this.nom} crie.`);
|
||||
}
|
||||
}
|
||||
|
||||
const monAnimal = new Animal("Lion");
|
||||
monAnimal.crier();
|
||||
Reference in New Issue
Block a user