diff --git a/03_Day_Booleans_operators_date/03_booleans_operators_date.md b/03_Day_Booleans_operators_date/03_booleans_operators_date.md index bb376ae..c01d003 100644 --- a/03_Day_Booleans_operators_date/03_booleans_operators_date.md +++ b/03_Day_Booleans_operators_date/03_booleans_operators_date.md @@ -76,6 +76,17 @@ We agreed that boolean values are either true or false. - All strings are truthy except an empty string ('') - The boolean true +#### ⚠️ Note: +Even though non-zero numbers and decimal numbers(like -1,1.5,etc) are truthy in a Boolean context, they are not equal to true when using ==. + +Example: Truthy but not equal to true + +if (-1) → Evaluates to true because -1 is truthy. + +-1 == true → Returns false because true is coerced to 1, and -1 is not equal to 1. + +To explicitly check the truthiness of a value, use Boolean(value) or use them in if-else , while or do-while conditional statements. + ### Falsy values - 0 diff --git a/14_Day_Error_handling/13_day_console_object_methods.md b/14_Day_Error_handling/14_Day_Error_handling.md similarity index 100% rename from 14_Day_Error_handling/13_day_console_object_methods.md rename to 14_Day_Error_handling/14_Day_Error_handling.md