I'm adding multiple `option` elements to a `select` element using jQuery. Based on the value of `data` the text of an option and whether or not it's disabled is different. The order of adding the option elements to the select element should be chronological since they are delivery options.

Ideally I'd like to add `if-else` statements but that's not working. The conditional ternary operator does work but it only seems to work for a single operation per case.

Example:

The default value for a specific option is '8/1 tussen 14:00-15:00 | €4.95'
If `data.response` is smaller then 0 then it should be '8/1 tussen 14:00-15:00 | Vol' and the option should be disabled. Else it should return the enabled default value for that option.

Here's what I'm currently trying:

```
$.each(timeSlotsObj, function(key, value) {
  var option_date = value.split(" ")[0].replace('/', '-'),
      option_slot = value.split(" ")[2];

  $.get("http://<REDACTED>/availability/" + selected_retailer_id + "/" + option_date + "/" + option_slot, function(data) {
    delivery_time_element.append($("<option/>", {
        value: key,
        text: data.response < 1 ? (
          new_value = value.split(' ')
          new_value[4] = 'Vol'
          new_value.join(' ')
        ) : value,
        disabled: data.response < 1 ? true : false
    }));
  });
});

```

But this returns a `Uncaught SyntaxError: Unexpected identifier` for:

```
new_value[4] = 'Vol'

```

What else could I try?