     cardNumber.length == 16 &amp;&amp;
            cardNumber.indexOf('4') == 0)
        {
            return 'visa';
        } 
        else if (cardNumber.indexOf('51') == 0 ||
                 cardNumber.indexOf('52') == 0 ||
                 cardNumber.indexOf('53') == 0 ||
                 cardNumber.indexOf('54') == 0 ||
                 cardNumber.indexOf('55') == 0 &amp;&amp;
                 cardNumber.length == 16)
        {
            return 'mastercard';
        }
        else if (cardNumber.l