mercredi 26 juin 2019

if statement is being executed even when the condition is false

while executing the code only if statements are being executed even when the condition is false.

I tried DEBUGGING and the condition i'm giving is definitely giving a false back but not sure why

 if (
    $("#ship-to-different-address-checkbox").length != 0 &&
    $(".shipping_address").length == 0
  ) {
    postcode = $("#shipping_postcode").val();
  } else {
    postcode = $("#billing_postcode").val();
  }

Aucun commentaire:

Enregistrer un commentaire