functioncheckBankCard(cardNo) { var tmp = true, total = 0 for (var i = cardNo.length; i > 0; i--) { var num = cardNo.substring(i, i - 1) if (((tmp = !tmp), tmp)) num = num * 2 var gw = num % 10 total += gw + (num - gw) / 10 } return total % 10 == 0 }