3 ms·
Thanks! It was the destructuring part that I wasn't understanding right away.
by nilbus 15y ago
Thanks! It was the destructuring part that I wasn't understanding right away.
- yesbabyyes 15y agoNo problem! CoffeeScript's destructuring is really nice, IMO: [first, rest..., last] = someArray professions = programmer: studyTime: "5 years" salary: 10000 salesman: studyTime: "2 years" salary: 15000 {programmer: {salary}} = professions console.log "A programmer's salary is %s", salary EDIT: Fixed bug, "developer" should be "programmer".
- jrnkntl 15y ago{developer: {salary}} = professions