diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..483be22 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "javascript", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "javascript", + "version": "1.0.0", + "license": "ISC" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..25d3f42 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "javascript", + "version": "1.0.0", + "description": "Repository of JavaScript practices and works.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +} diff --git a/src/this_0001.js b/src/this_0001.js new file mode 100644 index 0000000..e47ded9 --- /dev/null +++ b/src/this_0001.js @@ -0,0 +1,54 @@ + + +const mw2005 = { + + brand: `Need For Speed`, + title: `Most Wanted`, + blackListedRacersCount: 15, + gameName: function() { + return `The game is called ${this.brand} ${this.title} & it has ${this.blackListedRacersCount} blacklisted racers`; + }, + blackListedRacersAndCars: { + + blackList01: { + name: `Clarence "Razor" Callahan`, + car: `BMW M3 GTR GT (E46)`, + activity: function() { + return `The racer's name is ${this.name} & he drives a ${this.car}`; + }, + }, + blackList02: { + name: `Toru "Bull" Sato`, + car: `Mercedes-Benz SLR McLaren`, + activity: function() { + return `The racer's name is ${this.name} & he drives a ${this.car}`; + }, + }, + blackList03: { + name: `Ronald "Ronnie" McCrea`, + car: `Aston Martin DB9`, + activity: function() { + return `The racer's name is ${this.name} & he drives a ${this.car}`; + }, + }, + blackList04: { + name: `Joe "JV" Vega`, + car: `Dodge Viper SRT10`, + activity: function() { + return `The racer's name is ${this.name} & he drives a ${this.car}`; + }, + }, + blackList05: { + name: `Wes "Webster" Allen`, + car: `Chevrolet Corvette C6`, + activity: function() { + return `The racer's name is ${this.name} & he drives a ${this.car}`; + }, + }, + + } + +} + +console.log(mw2005.gameName()); +console.log(mw2005.blackListedRacersAndCars.blackList01.activity()); \ No newline at end of file