@alexsunny123
Nothing here yet.
Nothing here yet.
Hello, if (true) { var language1 = "js"; // language1 is of global scope. let language2 = "c"; // language2 is local to this block const language3 = 'c++'; // language3 is local to this block } console.log(language1); // prints js console.log(language2); // error because language2 is not visible outside the if block console.log(language3); // error because language3 is not visible outside the if block To clear out the wind Scope and Context are different things We discussed scope in the above section, and Context is used to refer to the value https://topdatingwebsitesx.com/random-talk https://topdatingwebsitesx.com/chat-avenue https://chatrandom.live of this in some particular part of your code. There are functions you can call to change the value of this, we will take about it later ever tried console logging this outside any function. outside any function (in global scope) this is always the Window Object. thanks alexsunny
Hello, You can try it hope this will work. function changeThatArray(arr) { arr[0] = 100; } var sampleArray = [10,20,30] console.log(sampleArray[0]); // 10 changeThatArray(sampleArray); https://ometv.onl https://chatroulette.top https://omegle.wtf https://bazoocam.cam console.log(sampleArray[0]); // 100 thanks alexsunny