mirror of
https://github.com/Cametendo/EMVs-Creative-coding.git
synced 2026-06-20 17:45:02 +02:00
21 lines
529 B
JavaScript
21 lines
529 B
JavaScript
class Student {
|
|
constructor(name, mood) {
|
|
this.name = name;
|
|
this.mood = mood;
|
|
}
|
|
}
|
|
|
|
function printName(student) {
|
|
console.log(`Student's name is: ${student.name}`);
|
|
}
|
|
|
|
const printMood = (student) => console.log(`Student's mood is ${student.mood}`);
|
|
|
|
//Multiline:
|
|
export default Student;
|
|
export { printName }; // export { printName as displayName };
|
|
export { printMood }; // export { printName as displayMood };
|
|
|
|
// Or one liner (Only one export works though):
|
|
// export { Student as default, printName, printMood };
|