Hello 

This is the day 14 of #30 days of javascrip coding, at this day I studied If Condition and i learned that
1- Very simply put, the course of the code or the final result depends on more than one condition, meaning there will be more than one condition in the code (Condition 1 - Condition 2 - Condition 3). If the first condition is met, it will be taken into account, and if it is not met, in this case we resort to the second condition, and if it is not met We resort to the third condition, and if it is not met, no result will appear because none of the three conditions are met
2-In the first case, I made a condition and asked: Is there a Discount? If I look at the variable of discount, I will find that it is false. If the condition is not met, we will resort to the next condition.
3- The second case: Is the user from Egypt? If I looked at a variable in country, I would find that it was KSA, not Egypt. Also, the second condition was not met
4- The third case: Is this person from Syria? Also, this condition is not met
5- If none of the three conditions are met, we will resort to the last condition 
That's what I learned today 


Comments

Popular posts from this blog