Day threeeeee! Hello! Today, was a review for me as I went over the following material when doing codecademy:
- Operators: compound assignment, comparison, ternary, comparison, and ranges.
- Switch statements
- Combining conditions
New things I learned:
- You can compare strings using less than or equal to operators. For example, "Taylor" <= "Swift". I did not understand how at first and then I read that strings have a natural alphabetical order!
- There are two types of range operators: i. half open range which is when you want to count up a certain number but not include that number. The syntax is two periods and a less than sign. For example, 1..<4 would be 1,2,3. ii. closed range is when you count up to a certain number and want to include that last number.The syntax is three periods. For example, 1...4 would be 1,2,3,4.
Until tomorrow !