HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <ul><li>script.js</li>
1 <ul><li>script.js</li>
2 </ul><p>JavaScript</p>
2 </ul><p>JavaScript</p>
3 <p>var processorPrice = { 'i5': 5000, 'i7': 10000 }; var displayPrice = { 13: 5000, 15: 10000 }; var memoryPrice = { 8: 3000, 16: 4000 }; var buildComputer = function (memory, display, processor) { var customComputer = { basicPrice: 5000, processor: processor, display: display, memory: memory, getDescription: function () { return 'computer with processor ' + this.processor + ', diagonal ' + this.display + ', RAM ' + this.memory; }, getPrice: function () { return this.basicPrice + processorPrice[this.processor] + displayPrice[this.display] + memoryPrice[this.memory]; } }; return customComputer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log('In the cart ' + myComputer.getDescription() + ' that costs ' + myComputer.getPrice());</p>
3 <p>var processorPrice = { 'i5': 5000, 'i7': 10000 }; var displayPrice = { 13: 5000, 15: 10000 }; var memoryPrice = { 8: 3000, 16: 4000 }; var buildComputer = function (memory, display, processor) { var customComputer = { basicPrice: 5000, processor: processor, display: display, memory: memory, getDescription: function () { return 'computer with processor ' + this.processor + ', diagonal ' + this.display + ', RAM ' + this.memory; }, getPrice: function () { return this.basicPrice + processorPrice[this.processor] + displayPrice[this.display] + memoryPrice[this.memory]; } }; return customComputer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log('In the cart ' + myComputer.getDescription() + ' that costs ' + myComputer.getPrice());</p>
4 <p>Thanks! We’ll fix everything at once!</p>
4 <p>Thanks! We’ll fix everything at once!</p>
5 <h2>Result</h2>
5 <h2>Result</h2>
6 <ol><li>After logging the message in the console, create variable anotherComputer, which is equal to the result of function buildComputer with arguments 16, 15, 'i5'.</li>
6 <ol><li>After logging the message in the console, create variable anotherComputer, which is equal to the result of function buildComputer with arguments 16, 15, 'i5'.</li>
7 <li>After declaration of variable anotherComputer, log in the console 'In the recycle bin ' + anotherComputer.getDescription() + ' that costs ' + anotherComputer.getPrice().</li>
7 <li>After declaration of variable anotherComputer, log in the console 'In the recycle bin ' + anotherComputer.getDescription() + ' that costs ' + anotherComputer.getPrice().</li>
8 </ol>
8 </ol>