I'm trying to create a function where I can multiply the values of an object and return the sum.
for example:
let object = {
'a': 4,
'b': 10,
'c': 5
}
my code looks like this:
function sumOfValues(testObject) {
let sumOfValues = (a * b * c)
return sumOfValues
}
let testObject = {
'a': 4,
'b': 10,
'c': 5
}
sumOfValues(testObject)
sumOfValues = (a * b * c)->sumOfValues = (testObject.a * testObject.b * testObject.c)