This very issue is one of my pet peeves of working in Java/C, because extract-function refactoring is severely inhibited by having only 1 return value, and it forces you to pass in mutable values ...
The function() call in JavaScript is used to define a function and specify its behaviour. Functions are blocks of code that can be invoked multiple times with different inputs, providing modularity ...