Assalamualaikum! Welcome to Milstone 06, Module-37 Practice Section, I am Nizam Student of Batch 07

Video 37-1 Module Overview, Primitive and non-primitive data type

Video 37-2 Null Vs Undefined, different ways you will get undefined

Video 37-3 Different Truthy and Falsy values in JavaScript

Video 37-4 double equal (==) vs triple equal (===), implicit conversion

Video 37-5 Block scope global scope simple understanding of Hoisting

Video 37-6 (advanced) Closure, encapsulation, private variable

Video 37-7 (optional) Callback function and pass different functions

Video 37-8 (advanced) function arguments pass by reference pass by value

Video 37-9 Module summary and Practice Problems


QUIZ

Q1: Which value is Falsy?
Ans: undefined

Q2: What is "closure"? (google: what is closure in javascript)
Ans: Access to an outer function's scope from an inner function AND function bundled together(enclosed) with references to its surrounding state

Q3: what would be the output? let p='Javascript'; let q=p; p='React'; console.log(q);
Ans: JavaScript

Q4: What will be the output (be careful. And think about it)? const isTrue='false'; if(!isTrue){ console.log('hello'); } else { console.log('world'); }
Ans: world

Q5: Which one will check whether the value and the type are the same for strict equality comparison?
Ans: ===

Q6: What will be the value of the result? function sum(p, q) { p + q; } const result = sum(2, 3); console.log(result);
Ans: undefined

Q7: When will you get undefined?
Ans: All of the above

Q8: What would be the output from the code below? if ("2" === 2) { console.log("Inside if"); } else { console.log("Inside else"); }
Ans: Inside else

Q9: What would be the output from the function below? function work(x, y = 4) { return x + y; } console.log(work(32);
Ans: Syntax error:

Q10: Can you access the let variable outside of the block scope?
Ans: No

THE END