最佳答案
We have received some JavaScript from an agency that looks wrong, but works.
For some reason they are adding square brackets ([
, ]
) around variables, like this:
var some_variable = 'to=' + [other_variable];
This works, but the square brackets seem completely superfluous.
Is there a purpose of using this syntax or is it technically incorrect, but ignored by the browser?