forked from Pat-On/JavaScript-Core-3-Coursework-Week3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
15 lines (12 loc) · 657 Bytes
/
index.js
File metadata and controls
15 lines (12 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// let citiesByPopulation = [
// { name: "London", population: 8000000 },
// { name: "Birmingham", population: 1000000 },
// { name: "Glasgow", population: 600000 },
// { name: "Manchester", population: 500000 },
// ];
// // Assign variables using array destructuring on this line
// let [london, birmingham, glasgow, manchester] = citiesByPopulation;
// console.log(`${london.name} population is ${london.population}`);
// console.log(`${birmingham.name} population is ${birmingham.population}`);
// console.log(`${glasgow.name} population is ${glasgow.population}`);
// console.log(`${manchester.name} population is ${manchester.population}`);