Exercises for learning

i do the code in this way

function calculadoraAdicaoSubtracao(numero , outronumero , operacao){

var operacao = (“São as operações soma e subtração” , “+”, “para adicao “ ou “-” ,“para subtração”);

var adicao = numero + outronumero;

var subtracao = numero - outronumero;

if operacao = “+”;{

return adicao ;


else if operacao = “-”;{

return subtracao;



console.lo(“Operação Inválida”)



I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).


What challenge is this exactly?

Also, this line: console.lo(“Operação Inválida”)
should be changed to: console.log(“Operação Inválida”)

You were missing a letter there. Not sure if that was your problem or not until I can check the challenge.

Also, based on what you pasted here, it appears your editor is using fancy double quotes instead of plain ascii double quotes, so you’ll need to fix that before anything is going to work.

Which means going from "