Skip to content
Open
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
38 changes: 38 additions & 0 deletions Practice/03_07/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,41 @@
* - Find an object that has another object inside of it to create a nested object.
* - Test your objects in the browser console by accessing the entire object and its specific properties.
*/
const cricketBat = {
name: "SG BAT",
Timber: "English Willow",
palyersThatuse: {
india:{
player1: "Virat Kohli",
player2: "Rohit Sharma",
},
australia:{
player1: "Steve Smith",
player2: "David Warner",
},
newzealand:{
player1: "Kane Williamson",
player2: "Ross Taylor",
}
},
weight: 1.2,
size: {
length: 85,
width: 10,
},
warranty: true,
price: 10000,
used: false,
thebatisused: function (used) {
this.used = used;
if (this.used === true) {
console.log(`The bat is used.`);
}else{
console.log(`The bat is not used.`);
}


}
}

console.log(cricketBat);