Multiple arguments vs. options object
When creating a JavaScript function with multiple arguments, I am always confronted with this choice: pass a list of arguments vs. pass an options object. For example I am writing a function to map a nodeList to an array: function map(nodeList, callback, thisObject, fromIndex, toIndex){ … } I could instead use this: function map(options){ … … Read more