software-tools-books / js4ds

JavaScript for Data Science
https://third-bit.com/js4ds/
Other
187 stars 32 forks source link

reason for defining and calling function simultaneously #208

Open karchern opened 4 years ago

karchern commented 4 years ago

In the 'Creating a Table of Contents' subsection of the 'Manipulating Pages' section, you explain how to define and call a (nameless) function at the same time. It confused me why you would want to do this. Why would you want to define a function if you don't intend to use it more than once?