(1)
if(a)等价于if(a==true) 或者if(a!=null)等等的意思。但是前者的范围比较大。 if(a)只要a!=0 ; a!=null;a!=undefined;a!=""的情况下就成立了。
(2)
.replace("被取代","取代")