I'm doing a lot of stuff with D3, so I've got lots of arrays of values, and to make code clearer, rather than placing the value arrays within another object with meta-information (like name, color, whatever) I'm just setting that meta-information as properties on the array. It makes the code a lot clearer, and easier to do d3 operations / other stuff to related data.
Is there anything that's going to hurt me down the line? Object.keys isn't going to work right, and the code is going to be slightly harder to look at in the console, but I can work around that.
Code example:
rather than
var a = {
name = "something",
foo = "bar"
values = [{x: 1, y:2}, , , ]
};
doing
var a = [{x:1, y:2}, , , , ];
a.name = "something";
a.foo = "bar"