Update javascript.html.markdown (#4178)

var => function/global , let => lexical/block scoped
This commit is contained in:
Konstantinos Lampropoulos 2022-01-03 18:18:07 +02:00 committed by GitHub
parent f39dcdd44e
commit 334b090a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.