diff --git a/index.html b/index.html index 2d5a61b..d68d155 100644 --- a/index.html +++ b/index.html @@ -3,9 +3,26 @@ ES6 + +
+ diff --git a/index.js b/index.js index f90b9de..377ce9d 100644 --- a/index.js +++ b/index.js @@ -1,30 +1,18 @@ -/* -Modify "personInfo" function to match console.log output at the end of the challenge. +//Arrow function cannot be used as function constructor, Exception: ... Is not a constructor -Object that is returned by "personInfo" function must contain only shorthand property names. -*/ +function Pyramidian(isu, firstname, lastname){ + this.isu=isu, + this.firstname=firstname, + this.lastname=lastname +} // This works fine -const personInfo = (/* parameters */) => { - /* return ... */ -}; +var pyramidian= new Pyramidian(1, "Souleymane", "Condé"); -const person = { - name: "Alice", - age: 19, - location: { - country: "England", - city: "London" - } -}; - -console.log(personInfo(person)); -/* -{ - name: "Alice", - personAge: 19, - origin: "England", - homeCity: "London", - friendsQty: 0, - recordCreatedAt: *current year* +var Pyramidien= (isu, firstname, lastname)=>{ + this.isu=isu, + this.firstname=firstname, + this.lastname=lastname } -*/ + +// console.log(pyramidian) +console.log(new Pyramidien(1, "Souleymane", "Condé")) \ No newline at end of file diff --git a/tempCodeRunnerFile.js b/tempCodeRunnerFile.js new file mode 100644 index 0000000..0bba4ea --- /dev/null +++ b/tempCodeRunnerFile.js @@ -0,0 +1,2 @@ +var type= typeof [] +console.log(type) \ No newline at end of file