new to google apps script and trying to find the second highest value in a range. When I input a range like `[45, 101, 100, 40]` the value returned is `101`. Clearly the `sort()` isn't working as it is just returning the second value in the range. What am I missing?

```
function second_max(range) {
  if (range) {
    var arr = [];
    for (var i = 0; i < range.length; i++) {
      arr.push(range[i]);
    }
    arr.sort();
    Logger.log(arr);
    return arr[1];
  }

}

```