How to transform true and false to 1 and 0? I use the following code:

  var newValue = ($(event.target).is(":checked")) ? 1 : 0;
  var oldValue = (!$(event.target).is(":checked")) ? 1 : 0;
  sendMessage(this.name, oldValue, newValue);


Is there any better approach?
sendMessage(this.name, +!event.target.checked, +event.target.checked)

Not your sending sendMessage(text, !bool, bool) which is silly just send one bool.

Also $(thing).is(":checked") is stupid (jQuery ಠ_ಠ)