Skip to content

Commit bd7e3df

Browse files
authored
Add robot object with functionality methods
1 parent b18e135 commit bd7e3df

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Codecademy/destructuring.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const robot = {
2+
model: "1E78V2",
3+
energyLevel: 100,
4+
functionality: {
5+
beep() {
6+
console.log("Beep Boop");
7+
},
8+
fireLaser() {
9+
console.log("Pew Pew");
10+
},
11+
},
12+
};
13+
14+
const { functionality } = robot;
15+
functionality.beep();
16+
functionality.fireLaser();

0 commit comments

Comments
 (0)