Q1.Explain The Concept of Truthy & Falsy Values in JavaScript.
What Are Truthy Values?
Truthy values are values that are evaluated to be true when used in a Boolean context. Simply put, any value that is not explicitly falsy is considered truthy.
What Are Falsy Values?
Falsy values are values that evaluate to false when used in a Boolean. JavaScript has a fixed list of falsy values.
Q2. Variable scope in JavaScript.
Scope and lifetime of variables in Java with examples ...The scope of a variable refers to the specific region of your code where that variable is visible and accessible.…