function foo() {
var y = 3;
var w = function baz(){
var p = 2;
};
}
In that code, the identifier baz should be in the same scope as var p (aka, level 2), since identifiers of named function expressions are always in their own function's scope (and read-only), not in the containing scope.
However, I tried this on the demo page (http://mazurov.github.io/eslevels-demo/) and it's incorrectly identifying it in the outer scope (level 1), the same as var y.

In that code, the identifier
bazshould be in the same scope asvar p(aka, level 2), since identifiers of named function expressions are always in their own function's scope (and read-only), not in the containing scope.However, I tried this on the demo page (http://mazurov.github.io/eslevels-demo/) and it's incorrectly identifying it in the outer scope (level 1), the same as
var y.