mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
Update javascript.html.markdown (#4178)
var => function/global , let => lexical/block scoped
This commit is contained in:
parent
f39dcdd44e
commit
334b090a4d
@ -590,7 +590,7 @@ if (Object.create === undefined){ // don't overwrite it if it exists
|
|||||||
// ES6 Additions
|
// ES6 Additions
|
||||||
|
|
||||||
// The "let" keyword allows you to define variables in a lexical scope,
|
// The "let" keyword allows you to define variables in a lexical scope,
|
||||||
// as opposed to a block scope like the var keyword does.
|
// as opposed to a function scope like the var keyword does.
|
||||||
let name = "Billy";
|
let name = "Billy";
|
||||||
|
|
||||||
// Variables defined with let can be reassigned new values.
|
// Variables defined with let can be reassigned new values.
|
||||||
|
Loading…
Reference in New Issue
Block a user