Switch statement does not work

trying to solve one kata using switch instead if, i don’t know why it doesn’t work.
here the code:

function basicOp(operation, value1, value2)
  switch operation{
      case "+":
      var result = value1+value2;
      case "-":
      result = value1-value2;
      case "*":
      result = value1*value2;
      case "/":
      result = value1/value2;
  return result;

please share challenge requirements, otherwise we don’t know what you must do

sorry @ilenia here it go:
Your task is to create a function that does four basic mathematical operations.

The function should take three arguments - operation(string/char), value1(number), value2(number).
The function should return result of numbers after applying the chosen operation.


basicOp('+', 4, 7)         // Output: 11
basicOp('-', 15, 18)       // Output: -3
basicOp('*', 5, 5)         // Output: 25
basicOp('/', 49, 7)        // Output: 7

maybe look again at switch syntax

don’t you get a syntax error there?

also that result is undefined in most cases
as you define it only in one of the switch cases - maybe define it before the switch statement?

It was only the stupid (), thanks @ilenia!