You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse JSON object to a JavaScript value // converting data into js object
106
106
-------------------------------------------------
107
-
107
+
let name = "priya";
108
+
function getName(){
109
+
console.log(name); //Uncaught ReferenceError: Cannot access 'name' before initialization
110
+
let name = "supriya";
111
+
}
112
+
getName();
113
+
//Explaination : Hoisting used here. If we use VAR the can use variable before declare. But in LET we can't do that. LET/CONST need declaration first then can use it.
0 commit comments