3 ms·
This would work, but attrs should really be an object (i.e. var attrs = {};), not an array, since you're storing string keys, and stylistically you can just use
by Spoom 10y ago
This would work, but attrs should really be an object (i.e. var attrs = {};), not an array, since you're storing string keys, and stylistically you can just use e.g. attrs.name instead of attrs['name'].