Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,26 @@
<head>
<title>ES6</title>
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin="anonymous">
</head>

<body>
<br />
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="#">Main</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contacts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Register</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Login</a>
</li>
</ul>
<script src="index.js"></script>
</body>

Expand Down
40 changes: 14 additions & 26 deletions index.js
Original file line number Diff line number Diff line change
@@ -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é"))
2 changes: 2 additions & 0 deletions tempCodeRunnerFile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var type= typeof []
console.log(type)