-1
someone helps me in this activity, I do not understand and does not get in the head, I have not seen a good explanation.
Now we ask you to declare a function called tripleDaSoma() that takes two parameters. Then you have to add both and return three times the result value of the sum of the two parameters. To do this, you already count (even if you don’t see it declared) with the triple function, which takes a parameter and returns its value multiplied by three.
I tried to do so.
function triploDaSoma(num1, num2){
function triplo(num1, num2){
var resultado1 = somar(3, 2) * 3;
return resultado1;
}
var resultado = somar(4, 5) * 3;
return resultado;
}
but there’s a mistake saying it’s missing: Mistakes:
You must use the triple() function within tripleDaSoma The execution of the triple functionDaSoma(3,2) must return the value 15 triple functionDaSoma(4,5) must return the value 27
Honestly if I don’t learn Function I give up javascript.
What is your doubt?
– Felipe Avelar
Could you show what you tried? What language are you using? This guide can help you improve this question. https://pt.meta.stackoverflow.com/questions/5483/manual-de-como-nÃo-fazer-perguntas
– Danizavtz
I didn’t understand how to do a bad function and I have to create another one inside, I swear I’ve seen so many videos and I’ve read so much about it but it hasn’t entered my head...
– Francisco das Chagas S. Araújo
try to do like this: Function tripleDaSoma(num1, num2){ Function triple(num1, num2){ var resultado1 = sum(3, 2) * 3; Return results1; } var result = add(4, 5) * 3; turn result; }
– Francisco das Chagas S. Araújo
You always say you’re wrong. You must use the triple() function within tripleDaSoma The execution of the triple functionDaSoma(3,2) must return the value 15 The execution of the triple functionDaSoma(4,5) must return the value 27
– Francisco das Chagas S. Araújo
Edit your question with this code and explain why you tried it in the question, because the question is not very clear :/
– Felipe Avelar
Reading the error, it seems that you use an exercise platform and she wants you to use the function
triplo
to make the multiplication– Felipe Avelar
yes, it’s from Santander Coder, a scholarship for training devs. And I’m in the first week of elimination...
– Francisco das Chagas S. Araújo