let in javascript
let: //only available inside the scope it's declared, like in "for" loop,
var: //accessed outside the loop "for"The let statement declares a block scope local variable, optionally initializing it to a value.
let x = 1;
if (x === 1) {
let x = 2;
console.log(x);
// expected output: 2
}
console.log(x);
// expected output: 1var i = "global";
function foo() {
var i = "local"; // Otra variable local solo para esta función
console.log(i); // local
}
foo();
console.log(i); // globallet /*Var name*/ = /*what is equals*/
Also in JavaScript:
- angular open poort in network
- if odd js
- discord bot javascript remove user data in array
- js object entries
- check if not checked vanila js
- mysql json_extract remove quotes
- nextjs svg npm
- run after 1s javascript
- const { message }
- location.reload sweetalert
- go to another page javascript
- how to put firebase config in a sperate file react native
- collision detection three js
- queryselector javascript varias clases
- sample of jstree ajax call code farm
- replace non alphanumeric javascript
- javascript return string
- react hook form validate email
- iterate over enum angular ngfor
- es6 method definition syntax
- JAVASCRIPT KEYDOWN AROW
- back press subscriptions i is not a function react native
- find react version
- string includes in js