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 buildComputer = function (memory, display, processor) { var computer = { basicPrice: 5000, processor: processor, display: display, memory: memory, getDescription: function () { return 'computer'; } }; return computer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log('In the cart ' + myComputer.getDescription());</p>
3 <p>var buildComputer = function (memory, display, processor) { var computer = { basicPrice: 5000, processor: processor, display: display, memory: memory, getDescription: function () { return 'computer'; } }; return computer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log('In the cart ' + myComputer.getDescription());</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>Replace the string returned by method getDescription with 'computer with processor ' + computer.processor + ', diagonal ' + computer.display + ', RAM ' + computer.memory.</li>
6 <ol><li>Replace the string returned by method getDescription with 'computer with processor ' + computer.processor + ', diagonal ' + computer.display + ', RAM ' + computer.memory.</li>
7 <li>Add one more method getPrice, which returns computer.basicPrice, to the computer object.</li>
7 <li>Add one more method getPrice, which returns computer.basicPrice, to the computer object.</li>
8 <li>Replace the message to be logged in the console with 'In the cart ' + myComputer.getDescription() + ' costs ' + myComputer.getPrice().</li>
8 <li>Replace the message to be logged in the console with 'In the cart ' + myComputer.getDescription() + ' costs ' + myComputer.getPrice().</li>
9 </ol>
9 </ol>