From eb7fca516c7cbbb1edfb21e9de7ce80a4da15e4d Mon Sep 17 00:00:00 2001 From: MOHAMMED FAIZAN MAQSOODAHMED PATEL <68345709+FAIZAN101013@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:37:57 +0530 Subject: [PATCH] Update script.js --- Practice/03_07/script.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Practice/03_07/script.js b/Practice/03_07/script.js index 9a82c281..a0b910ff 100755 --- a/Practice/03_07/script.js +++ b/Practice/03_07/script.js @@ -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);