Learn the foundations of JavaScript functions in this vide. Discover what functions are, two ways to create them, and how to use them in your code.
Functions in programming are a way to reuse logic. They are the fundamental building block of logic in any programming language.
Functions allow you to reuse logic across your program easily.
A good function is one that is pure. What is a pure function you ask? A pure function is a function that returns the same value, if the inputs are the same. (like in the video).
When I was learning to code, I hadn't the faintest clue what functions were until I tried them for myself. Try them out using your code editor and tell me if you understand what functions are after this video!
If you got here, you must really like my video. Subscribe if you'd like to see more JavaScript foundations (or CS foundations, really!)