Angular Ionic Interview Questions
JAVASCRIPT What is hoisting? Its mechanism Variable and function declarations are moved to the top of their scope before code execution. console.log(x) //undefined var x = 10 console.log(x) // print 10 console.log(y+z) //reference error let y = 10 const z = 10 --------------------------------------------------------------------------------------------------------------------------- Difference between let and var? --------------------------------------------------------------------------------------------------------------------------- What are let, var, and const in javascript? let - block scoped, redeclared not supported in same scope const - block scoped, redeclared or redesigned are not supported var - function scoped, redeclared and redesigned are supported function scope function test(){ var a = 10; var a = "mani"; //redeclared and redesigned are supported with the scope } block scope if(test){ let a = 10; let b = 11; //error if(tt){ let b = 12; //working } } if(test) ...