账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    请教这段js代码中最后为什么还要写一个return true?
    30
    0
    String.prototype.endWith = function(str){  
         if(str==null || str=="" || this.length == 0 ||str.length > this.length){      
           return false;  
         }  
         if(this.substring(this.length - str.length)){  
             return true;  
         }else{  
             return false;  
         }  
         return true; //这句代码的作用和意义是什么? 私以为以上两个条件语句已经包含所有情况-_-||
    };  

    如题

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 铁血炮灰 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部