Ich wollte eine praktische Funktion, um jQuery Eltern> Kind-Selektor-Strings zu verketten. Ich kann Folgendes nicht in CS 1.10.0 (auch in 1.7.1 getestet) erhalten. Was mache ich falsch?CoffeeScript: Falsch Komma im Verständnis verbunden durch leeres Trennzeichen
pcsel = (parent_sel, child_sels...) ->
### Uitlity for forming parent > child selector string ###
childchain = [" > " + child for child in child_sels]
parent_sel + childchain.join('')
console.log pcsel("foo", "bar") # OK. yields "foo > bar"
console.log pcsel("foo", "bar", "glop") # BAD. yields "foo > bar, > glop"
# Sanity check
console.log "foo" + [" > bat", " > glop"].join('') # OK. yields "foo > bar > glop"
Vielen Dank!
(Ich habe auch dies als ein Problem in der CS-Repository veröffentlicht)