This tutorial will explain what pure functions are, how to write them, and why you should. A concept from functional programming, pure functions will keep your code clean, make it easy to test, and likewise, make it easier to debug. There are just a couple of rules for pure functions. I'll cover those and provide several examples along the way. If you are just beginning to learn Javascript, I suggest starting with my full 8 hour course tutorial here: ua-cam.com/video/EfAl9bwzVZk/v-deo.html 🚀
Yours are some of the clearest and most useful JS tutorials on UA-cam. Bummer it's hard to gain views with such advanced topics, but this makes your hard work just more valuable! Big respect.
This is the greatest JavaScript channel i could ask for. Your clear explanation of all of these JS concepts are incredibly helpful. Thank you so much for this content!
Wow, 1st video on JavaScript functions that I have come across that is not a person speaking broken English. It is hard enough to learn without having to decipher what the person is trying to say.
You are the best man! Whenever I want something advanced or to get an idea in depth I check if you have it on your channel first! It's like your channel is becoming my bible
You made the subject so pleasurable to follow, straight to the facts. Helping my favorite mentor to make it more to the YT algorithm, one comment at a time :)
Thanks again Dave for the "DETAIL", it really really helps. And thanks on the MVC advice, downloaded an app with a OOP version and then one with a functional version and it really brought some insight of the inner workings of both. You have a way to help support your work there? again, thanks so much!
@DaveGray a great tutorial and such a great playlist. but i have one question/correction timestamp 7:23. i think increment function doesn't break rule #3 which is mutating a variable because increment function is just assigning a value to x not mutating it and also primitive variables are immutable
Hi, Kindly try to upload the code in a GitHub repository. I Don't Know If you have a GitHub repository for this tutorial. But try to upload the code for other tutorials. Thank you for making this content! Big respect.
If a function not returning something means automatically it returns a undefined value. In this case it's not pure function? What if I explicitly return undefined?
That's a good question! If you stick with the rules of Pure Functions... Does the same input always produce the same output? Are there no side effects? If it meets those expectations, it is considered Pure.
This tutorial will explain what pure functions are, how to write them, and why you should. A concept from functional programming, pure functions will keep your code clean, make it easy to test, and likewise, make it easier to debug. There are just a couple of rules for pure functions. I'll cover those and provide several examples along the way. If you are just beginning to learn Javascript, I suggest starting with my full 8 hour course tutorial here: ua-cam.com/video/EfAl9bwzVZk/v-deo.html 🚀
Yours are some of the clearest and most useful JS tutorials on UA-cam. Bummer it's hard to gain views with such advanced topics, but this makes your hard work just more valuable! Big respect.
Thank you! 💯🙏
This is the greatest JavaScript channel i could ask for. Your clear explanation of all of these JS concepts are incredibly helpful. Thank you so much for this content!
You're very welcome! 💯🙏
Today I have the "Dave Gray's video evening". One after another. And all of them are very informative and very easy to listen and absorb. 👉🏼🔥
Glad you like them!
Wow, 1st video on JavaScript functions that I have come across that is not a person speaking broken English. It is hard enough to learn without having to decipher what the person is trying to say.
Awesome video Dave! I love functional programming and have been playing with the idea of making a video about currying.
Thanks Tom! 🙏 I was thinking about that topic as my next, too. I think you should also make one. I'll check it out ☑️💯
You are the best man!
Whenever I want something advanced or to get an idea in depth I check if you have it on your channel first! It's like your channel is becoming my bible
Thank you for the kind words!
You made the subject so pleasurable to follow, straight to the facts. Helping my favorite mentor to make it more to the YT algorithm, one comment at a time :)
Thank you, Matin! 🙏
Awesome content sir. Needed to brush up my memory on these small but yet important topics
Glad it was helpful!
Great video thanks Dave Sir.
Namaste from India.❤️🙏
You're welcome! 🙏💯
@@DaveGrayTeachesCode ☺️☺️☺️🙏🙏
Thank you so much for this video! I always read that pure functions should not have any side effects, but never understood the meaning.
Glad I could help!
Rewatching this was a pleasure :)
Thank you, Matin! 🙏
Thanks!
Seems quite important concept (...which requires a lot of practice).
You're welcome, Louis!
Thanks again Dave for the "DETAIL", it really really helps. And thanks on the MVC advice, downloaded an app with a OOP version and then one with a functional version and it really brought some insight of the inner workings of both. You have a way to help support your work there? again, thanks so much!
You're welcome! I appreciate the kind words. And thanks for asking. This summer I plan to look into a Patreon and hopefully launch an email, too. 🙏💯
Awesome job man! this is the best tutorial about this subject!
Thank you Zaid! 🙏
Very concise and informative, thank you sincerely!
Glad it was helpful! 💯
thank you very much for this info bro! SO helpful!
Glad it was helpful!
Amazing tutorial. Thank you for making high quality contents!!
You're welcome! 💯🙏
@DaveGray a great tutorial and such a great playlist. but i have one question/correction timestamp 7:23. i think increment function doesn't break rule #3 which is mutating a variable because increment function is just assigning a value to x not mutating it and also primitive variables are immutable
That increment function is not taking any parameters. It is changing the value of globally assigned variable x.
Assigning a value also a kind of mutation.
Great video. Learned a lot.
Glad to help!
Thanks Dave . Keep going PLS :]
You're welcome! 💯🚀
Great Video... HATS OFF
Glad you liked it!
great explanation
Thanks Ted! 🙏
Thanks a lot!
You're welcome! 💯
thanks
Hi, Kindly try to upload the code in a GitHub repository. I Don't Know If you have a GitHub repository for this tutorial. But try to upload the code for other tutorials. Thank you for making this content! Big respect.
Thanks for the request! For some of these short tutorials, I encourage viewers to simply recreate the examples as I go.
Amazing
If a function not returning something means automatically it returns a undefined value. In this case it's not pure function? What if I explicitly return undefined?
That's a good question! If you stick with the rules of Pure Functions... Does the same input always produce the same output? Are there no side effects? If it meets those expectations, it is considered Pure.
thanks