|
|
|
|
|
by whateverer
5289 days ago
|
|
No, the Javascript model is "you name things with `var`, you mutate things with `=`". Python went for a more complicated scheme of having every variable in a function be a new binding when first assigned, and then it's just mutation (i.e. 'local'), unless explicitly declared to be nonlocal, but it still makes sense with their... penchant for mutable state. And Coffescript instead went over to PHP to have some of the glue it was eating. |
|
If only it were that simple. It also has "you create thing with `var` and sometimes with `=`", plus it does not have block scope: