Skip to content

Commit

Permalink
Day 26: Hoisting, Scoping, Memory Management
Browse files Browse the repository at this point in the history
  • Loading branch information
uttu-316 committed Nov 6, 2022
1 parent 7c757a3 commit f5461ba
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions javascript/Day26/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
var arr = [1, 2, 3, 4, 5];

var isPresent = arr.includes(4);

console.log(isPresent);

var x = 2;

console.log(x);

let y = 3;

console.log(y);

y = 10;

console.log(y);

const z = 4;

console.log(z);

z = 5;

console.log(z);

var a = 2;
function abc() {
var b = 3;
if (a < b) {
let c = 4;
}
console.log(a, b, c);
}

abc();

var x = 2;
var p = 3;
function abc() {
console.log(x + " inner-x");
p = 4;
x = 3;
var y = 3;
console.log(y);
}
abc();
console.log(y + " outer-y");

0 comments on commit f5461ba

Please sign in to comment.