14
#4) Explain Implicit Type Coercion in JavaScript❔
💠The process of automatic or implicit conversion of values from one data type to another.
💠It takes place when the operands of an expression are of different data types.
✅It occurs when ' +, -, /, * ' operator is used.
✅When a number is added to a string, the number type is always converted into string type.
✅When a number is divided, subtracted or multiplied to a string, the string is always converted into number type.👇
✅When a Boolean is added to a Number, the Boolean value is converted to a number.
✅A Boolean value can be represented as 0 for false or 1 for true.
⚠All values except 0, 0n, -0, "", undefined, null, NaN are truthy values.
✅The '==' operator compares values but not types.
✅Returns true because both 'a' and 'b' are converted to the same type and then compared. Hence the operands are equal.👇
14