3 ms·
With risk of offending both sides of the argument, both long functions, and split functions are fine. Functions within functions are great for async code as you
by z3t4 7y ago
With risk of offending both sides of the argument, both long functions, and split functions are fine. Functions within functions are great for async code as you can make use of the closure/lexical scope. eg. When the network request come back you still have acces to variables declared in parent function. And you can also freeze state/value of variables in time - by making them into function parameters copied by value.