© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
J. BartlettProgramming for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-8751-4_10

10. Introducing Functions and Scope

Jonathan Bartlett1  
(1)
Tulsa, OK, USA
 

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, ...

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.