mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
with splats allowed in destructuring assignment
This commit is contained in:
@@ -43,4 +43,20 @@ person: {
|
||||
{name: a, family: {brother: {addresses: [one, {city: b}]}}}: person
|
||||
|
||||
print(a is "Bob")
|
||||
print(b is "Moquasset NY, 10021")
|
||||
print(b is "Moquasset NY, 10021")
|
||||
|
||||
|
||||
test: {
|
||||
person: {
|
||||
address: [
|
||||
"------"
|
||||
"Street 101"
|
||||
"Apt 101"
|
||||
"City 101"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
{person: {address: [ignore, addr...]}}: test
|
||||
|
||||
print(addr.join(', ') is "Street 101, Apt 101, City 101")
|
||||
Reference in New Issue
Block a user