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 }; return computer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log(myComputer);</p>
3
<p>var buildComputer = function (memory, display, processor) { var computer = { basicPrice: 5000, processor: processor, display: display, memory: memory }; return computer; }; var myComputer = buildComputer(8, 13, 'i7'); console.log(myComputer);</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>Add the getDescription method, which returns the 'computer' line, to the computer object.</li>
6
<ol><li>Add the getDescription method, which returns the 'computer' line, to the computer object.</li>
7
<li>Instead of logging variable myComputer in the console, log message 'In the cart ' + myComputer.getDescription().</li>
7
<li>Instead of logging variable myComputer in the console, log message 'In the cart ' + myComputer.getDescription().</li>
8
</ol>
8
</ol>