John great article. I think you should do another one, but cover Symbols in the next one and then relate it to this one, do it gives a wider range of examples and comparables for us learner's.
I've been coding for three years and have found Generators and Symbols to be very hard to understand. Even after your article which I admit did greatly improved my understanding, but still I could use more and Symbols would be a great addition arrive you do refer to them in this article often.
Thanks so much for reading. Symbols are nothing but primitive values that are used for identifiers for functions.
Generators let us control how to loop through things. It's especially useful if we want to return an indeterminate collection of things in a controlled way.
I was thinking of using a Generator to create that continuous loading effect that I've seen on websites like Facebook or pagination too. Would these be good usecases?
True on that point and awesome to hear that it's a good solution for the first point. Still trying to get my head around good use cases, because it's just not obvious to me when I first, second and 10th time heard about them.
Thanks for your support and feedback!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
John great article. I think you should do another one, but cover Symbols in the next one and then relate it to this one, do it gives a wider range of examples and comparables for us learner's.
I've been coding for three years and have found Generators and Symbols to be very hard to understand. Even after your article which I admit did greatly improved my understanding, but still I could use more and Symbols would be a great addition arrive you do refer to them in this article often.
Thank you for sharing it.
Hi Roger,
Thanks so much for reading. Symbols are nothing but primitive values that are used for identifiers for functions.
Generators let us control how to loop through things. It's especially useful if we want to return an indeterminate collection of things in a controlled way.
I was thinking of using a Generator to create that continuous loading effect that I've seen on websites like Facebook or pagination too. Would these be good usecases?
You can use async generators to get data for infinite scrolling.
Probably don't need generators for pagination as much since you're overwriting existing data.
True on that point and awesome to hear that it's a good solution for the first point. Still trying to get my head around good use cases, because it's just not obvious to me when I first, second and 10th time heard about them.
Thanks for your support and feedback!