I'm reading EcmaScript specification.
At 9.2.12, there are:
11.Let varNames be the VarDeclaredNames of code.
12.Let varDeclarations be the VarScopedDeclarations of code.
And at 13.1.5 and 13.1.6:
13.1.5 Static Semantics: VarDeclaredNames
Statement :
EmptyStatement
ExpressionStatement
ContinueStatement
BreakStatement
ReturnStatement
ThrowStatement
DebuggerStatement
Return a new empty List.
13.1.6 Static Semantics: VarScopedDeclarations
Statement :
EmptyStatement
ExpressionStatement
ContinueStatement
BreakStatement
ReturnStatement
ThrowStatement
DebuggerStatement
Return a new empty List.
They look like the same.So I want to know what's the difference between VarDeclaredNames
and VarScopedDeclarations
? Can you give me some examples?
Thanks.