so what's the difference between 1) var weeklySalary: Double { annualSalary / Double(weeksPerYear)} and 2) var weeklySalary: Double = annualSalary / Double(weeksPerYear) ? They both are calculated, aren't they?
No, They are quite different. In case 1, the value is not stored so if you change the value for weeksPerYear later on in your code, weeklySalary will be adjusted, whereas in case 2 you are storing the value of weeklySalary when you create the variable so changing the value of weeksPerYear later in your code will not update the value for weeklySalary
@@StewartLynch Thanks a lot. It’s so hard to memorize all of the details. I rewatch your videos all the time, even the cleanest explanation doesn’t help me remember from the first time.
It actually confused me, like how you added NEWValue without a clear use or explanations, you have highlighted it but still you didn't use it, which is making it unusable
You explain in a way that every learner can easily understand what you are talking about.I really appreciate your teaching way.
Perfect. Just what I wanted!
Finally I understood new Value !! Thank you 🙏🏻
Epic. Really good way of explain this by starting at what you used to do. Which is where most early programmers start and understand. Thanks.
the way you explain is just so great, thank you so much for your videos Stewart, please don't stop!
Thanks Maila. I don’t have that many more years left in me LOL, but as long as I can, I will continue.
this is dope, easy to understand. thank you
Love the way you explain each subject Stewart - as a newbie it really helps my understanding - thanks!
Glad you are finding them useful.
Really like your style of videos, very clear and easy to comprehend. Keep going!
Thanks. My plans are to release a new video every Sunday
Mind blown!....I think I understand getters and setters much better. Great example.
Great. Glad it helps.
Thanks a lot for the clear, easily digestible explanation.
when should one use "computed property" over a "method" in Swift?
John Sundell answers this question better than I could in this blog www.swiftbysundell.com/tips/computed-properties-vs-methods/
No wonder the video is clear as usual.
Great and simple examples, thank you!
Great. Glad you found it helpful. Check out the rest of my channel. Many more like this.
so what's the difference between 1) var weeklySalary: Double { annualSalary / Double(weeksPerYear)} and 2) var weeklySalary: Double = annualSalary / Double(weeksPerYear) ? They both are calculated, aren't they?
No, They are quite different. In case 1, the value is not stored so if you change the value for weeksPerYear later on in your code, weeklySalary will be adjusted, whereas in case 2 you are storing the value of weeklySalary when you create the variable so changing the value of weeksPerYear later in your code will not update the value for weeklySalary
@@StewartLynch Thanks a lot. It’s so hard to memorize all of the details. I rewatch your videos all the time, even the cleanest explanation doesn’t help me remember from the first time.
@@StewartLynch okay. Equal sign makes a variable to sorted, that’s logical. Thanks one more time.
@@StewartLynch sorry for the typos, I am typing with a phone.
Yes. You need to practice and use what you learn so you can remember.
Keep it up! Digging the videos
Thanks. Another series coming out on Sunday on JSON parsing and the Codable protocol
how did you put these bold titles in the playground. Looks cool. let me know how I can do it.
Editor Menu > Show Rendered Markup. It is Markup language that you can add as comments in your playgrounds.
why did you multiply hrsPerDay by 5?
Because I want to calculate the number of hours in a work week, and in Canada, where I am from, that is normally 5 days a week.
very good tutorial - thank you
I am pleased that people are starting to discover my channel.
it was definitely useful !!!!! Thank you!
Thanks for your complimentary comment. Much appreciated.
Wow. It was very good. TKS
It actually confused me, like how you added NEWValue without a clear use or explanations, you have highlighted it but still you didn't use it, which is making it unusable
Can you give me a timestamp in the video so I can check out what you are referring to. This was created a long time ago
thanks for the video
👍🏼👍🏼👍🏼
👍