Thread:Manual talk:Coding conventions/JavaScript/Whitespace inside of square brackets/reply (4)

I doubt whether we need to avoid space while accessing it. When in doubt I usually refer https://contribute.jquery.org/style-guide/js/#arrays-and-function-calls since that is the closest convention to MediaWiki(double quotes vs single quote being major difference). According to that, conventions for white spaces in arrays and function calls

Right

This also makes it consistent with rules for normal brackets-. "When a function has parameters, there should be a space on the inside side of both parentheses, for both function definitions and function calls."

I think we need to decide on this and update the Manual. I see square brackets used with and without white space in our codebase(example). Thanks.