In Firefox and Opera, you can do:
var [key, value] = key:value.split(:);
alert(key + = + value); // will alert key = value;
But it doesn't work in IE8 or Google Chrome.
Does anyone know a nice way to do this in other browsers without a tmp variable?
var tmp = key:value.split(:);
var key=tmp, value=tmp;