- script.js
JavaScript
var buildComputer = function (memory, display, processor) {
var computer = {
Result
GoalsCompleted 0 out of 3
- Replace the string returned by method
getDescription
with'computer with processor ' + computer.processor + ', diagonal ' + computer.display + ', RAM ' + computer.memory
. - Add one more method
getPrice
, which returnscomputer.basicPrice
, to thecomputer
object. - Replace the message to be logged in the console with
'In the cart ' + myComputer.getDescription() + ' costs ' + myComputer.getPrice()
.
Comments