Question:
I still cannot figure out why this code is not working. When I attempt to call a function.
Repl link:
const introducer = (name, shirt) => {
const person = {
name: name,
shirt: shirt,
assets: 100000,
liabilities: 50000,
netWorth: function () {
return this.assets - this.liabilities
}
}
const intro = 'Hi, my name is ${person.name} and the color of my shirt is ${person.shirt} and my net worth is $${person.networth()} USD'
return intro
}
console.log(introducer('James', 'black'))
console.log(introducer('Samuel', 'shirt'))