Generators - Javascript In Depth

  Рет қаралды 2,065

Tech with Nader

Tech with Nader

Күн бұрын

Пікірлер: 17
@XanEli1
@XanEli1 Жыл бұрын
Priceless video, I didn't even know about this, thanks!
@TechWithNader
@TechWithNader Жыл бұрын
You’re welcome! I was worried it would be too intense haha!
@XanEli1
@XanEli1 Жыл бұрын
It's a little more advanced than most of the other stuff covered so far, but it's not out of reach.
@644sixfortyfour4
@644sixfortyfour4 Жыл бұрын
I jumped back to this video as I really had no idea what generators are or where can they be useful. Going through this video alone, I can see myself using them as they can be really handy. Glad there are even more videos about generators , thank you very much Nader. 😁
@TechWithNader
@TechWithNader Жыл бұрын
Awesome, nice work! I can’t wait to use them more practically as we build more complex projects as well as look at how they are used in Classes 😊
@644sixfortyfour4
@644sixfortyfour4 Жыл бұрын
@@TechWithNader Those will be videos I'll be looking forward to then. 😉
@KRAKENBACK..
@KRAKENBACK.. Жыл бұрын
It seems like generators are a very powerful way to pull values whenever specifically needed, and save on tons of memory.
@TechWithNader
@TechWithNader Жыл бұрын
Yup exactly! It's tricky to use them for things other than iterators to start however it's important to be aware of the concept of 'lazy evaluation'. In fact, as you'll see later, async/await is actually based on this concept internally 😊
@vikaswakde-dj2dw
@vikaswakde-dj2dw 8 ай бұрын
Congrat's on 10K
@senniagordinskaya4051
@senniagordinskaya4051 3 ай бұрын
Thank you!
@KRAKENBACK..
@KRAKENBACK.. Жыл бұрын
Another question lol I'm back again rewatching and thought when we create the infinite loop for lazy evaluation and create our countergenerator = counter(); couldn't you have multiple countergenerators(1,2,3 ect) that save on memory, since it's a object could you add more properties in this object to x amount of different objects, and depending on the objects they could represent different things. My main question is what type of objects/concepts can we create with this in real world settings because it seems like a very efficient way to produce values.
@TechWithNader
@TechWithNader Жыл бұрын
Good question! In the real world this is used a lot to implement lazy evaluation code like something called the Observer pattern. It’s also used to make Iterators a lot. We actually explored only half of generators since you can also provide inputs to them so they are essentially no-directional pauseable functions. Also, concepts like async and await are based on them. For now just being aware of lazy evaluation and that they exist will be important as we move forward. 🤗
@simplyskandi5973
@simplyskandi5973 Жыл бұрын
👍
@jeremiahabiola994
@jeremiahabiola994 Жыл бұрын
👍🏽👍🏽👍🏽
@journeyofc6200
@journeyofc6200 2 күн бұрын
I saw this is nodejs stream docs
Exercises: Generators - Javascript In Depth
41:34
Tech with Nader
Рет қаралды 1,3 М.
Server Side Routing - Rest APIs In Depth
50:19
Tech with Nader
Рет қаралды 775
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 24 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 47 МЛН
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,4 МЛН
Custom Hooks - React In Depth
36:29
Tech with Nader
Рет қаралды 1,1 М.
POST Requests - Rest APIs In Depth
50:19
Tech with Nader
Рет қаралды 406
Exercises: Simple Web Server - Rest APIs In Depth
44:39
Tech with Nader
Рет қаралды 876
JavaScript Visualized - Execution Contexts
11:41
Lydia Hallie
Рет қаралды 63 М.
Network Protocols - Rest APIs In Depth
33:14
Tech with Nader
Рет қаралды 1,6 М.
Exercises: Server Side Routing - Rest APIs In Depth
1:12:05
Tech with Nader
Рет қаралды 793
Exercises: GET Requests - Rest APIs In Depth
1:05:20
Tech with Nader
Рет қаралды 612
HTTP Headers & Methods - Rest APIs In Depth
33:37
Tech with Nader
Рет қаралды 2,9 М.
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 24 МЛН