In the previous chapter, we learned about the nuts and bolts of how programming works, with assignment statements, conditional branching, and loops. For small programs, this is all you need. In fact, you can do any possible computation you might need to do with only these features. However, as your programs get larger—even just a little bit larger—you will need tools that will enable you to get more work done with each line of code and to organize your code into logical blocks. Imagine, for instance, ...
10. Introducing Functions and Scope
Get Programming for Absolute Beginners: Using the JavaScript Programming Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.