mirror of
https://github.com/Cametendo/EMVs-Creative-coding.git
synced 2026-06-20 17:45:02 +02:00
Added some things
This commit is contained in:
47
Week-3/import-export/main.js
Normal file
47
Week-3/import-export/main.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import { printMood, printName } from "./student-Object.js";
|
||||
|
||||
const myStudent1 = { name: "Sven", mood: "Ruffy" };
|
||||
|
||||
console.log("myStudent:", myStudent1);
|
||||
printName(myStudent1);
|
||||
printMood(myStudent1);
|
||||
|
||||
/*
|
||||
import Student, {
|
||||
printMood as printngMood,
|
||||
printName as printngName,
|
||||
} from "./student-Class.js";
|
||||
|
||||
const myStudent2 = new Student("Juerg", "Wanted");
|
||||
|
||||
console.log("myStudent:", myStudent);
|
||||
printingName(myStudent2);
|
||||
printingMood(myStudent2);
|
||||
*/
|
||||
|
||||
import Student, {
|
||||
printMood as renameFunction,
|
||||
printName as printedName,
|
||||
} from "./student-Class.js";
|
||||
|
||||
const myStudent = new Student("Nika", "God");
|
||||
|
||||
console.log("myStudent:", myStudent);
|
||||
printedName(myStudent);
|
||||
renameFunction(myStudent);
|
||||
|
||||
import {
|
||||
SomePeron,
|
||||
arrowFunction,
|
||||
normalFunction,
|
||||
someNumber,
|
||||
someObject,
|
||||
someString,
|
||||
} from "./directExport.js";
|
||||
|
||||
console.log(new SomePeron("someName", 22));
|
||||
arrowFunction();
|
||||
normalFunction();
|
||||
console.log(someNumber);
|
||||
console.log(someObject);
|
||||
console.log(someString);
|
||||
Reference in New Issue
Block a user