Learning about functions and can't understand why they break when I try to make a key a parameter. They work fine when making a value a parameter but not the key. What don't I know about JavaScript or jQuery that is breaking this?
example:
function box(e, a, q, r) {
$('div').animate({
r : e,
'height' : a
}, q);
}
box('200px', '200px', 500, 'width');
if I remove the 4th parameter r, it works fine. but something about making a key in a key/value pair doesn't work. Teach me, internet.