Javascript Converting From Nested Functions Into A Chained Functions

Javascript Converting From Nested Functions Into A Chained Functions