jchadwick / EssentialTypeScriptBook

Source for the eBook "Essential TypeScript"
https://leanpub.com/essentialtypescript
18 stars 12 forks source link

bugs in {#spread-operator} section #11

Open marzelin opened 8 years ago

marzelin commented 8 years ago

function add(...values) {

... token used in a parameter list is called rest parameter


var values = Array.prototype.splice.call(arguments, [1])

should be

var values = Array.prototype.slice.call(arguments),

for following reasons: