-2
I’m taking the first Javascript classes, so my doubts are simple. Enunciation:
After our consultation, Digitallaundry realized that could make your collection more sophisticated and fair. She decided charge R$10.00 fixed, as a service fee (independent of the amount of laundry), plus R $ 3,00 per kilo of laundry. Rewrite the function calculatValue
function calculaValorDevido(pesoDeRoupaSuja){ ... }
This function takes as its only parameter the amount of laundry. It should return the amount to be charged to the customer using the new price policy.
My code until then:
console.log(calculaValorDevido(10));
function calculaValorDevido(pesoDaRoupaSuja) {
var pesoroupaSuja
pesoDaRoupaSuja * 3
var fixo = 10.00
return fixo + pesoDaRoupaSuja
}
The mistake is:
There’s something wrong with your multiplication, make sure you’re returning multiplication correctly
You wrote the statement, an attempt. What doubt after all?
– Rebeca Nonato