coffeescript-cookbook/coffeescript-cookbook.github.com — pull request #84 by brigand (2013-08-10 10:06:13+00:00)
Title: Math.max.apply text is confusing and non-idiomatic code suggested

This is a proposed change to [arrays/max-array-value](http://coffeescriptcookbook.com/chapters/arrays/max-array-value).

> For backward compatibility with older JavaScript implementations, use Math.max.apply:
> ...
> ```coffeescript
> # Pre-ES5
> Math.max.apply(null, [12,32,11,67,1,3])
> # => 67
> ```

This is confusing, because the reader may not know that splats, in this context, compile into an `apply` call.

CoffeeScript:

```coffeescript
Math.max [12, 32, 11, 67, 1, 3]...
```

Compiles to:

```javascript
Math.max.apply(Math, [12, 32, 11, 67, 1, 3]);
```

It's not idiomatic to recommend using apply in this (or arguably any) context with CoffeeScript.