I am a novice in Java Script and I do not quite understand why variable `action` does not have any assigned value, even though I thought I have assigned it:

```
var prompt = require('sync-prompt').prompt;

var add = function(a, b){
    return a + b;
};
var minus = function(a, b){
    return a + b;
};
var multiply = function(a, b){
    return a + b;
};

var chooseAction = function(znak) {
  var action;

  switch(znak) {
    case "+":
        action = add;
        break;
    case "-":
        action = minus;
        break;
    case "*":
        action = multiply;
        break;
  }
  return action;
}

var compute = function() {
  var input = prompt("Wpisz działanie ");
  var arguments = input.split(' ');
  var a = parseInt(arguments[0]);
  var b = parseInt(arguments[2]);
  var action = chooseAction(arguments[1]);
  console.log("Wynik działania: " + action(a, b));
}

compute();

```