Scheme got this right in 1970. There is no excuse to design a new language this way.
Javascript seems to have the model "everything you do is global, unless you know better".
I'm not a big Javascript hater, but this is one very sore point.
That is not the JavaScript model at all.
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:
if( true)
{
var x = 1;
}
// x == 1 here. my $x = 10;