📜  kn ;jn - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:15.704000             🧑  作者: Mango

代码示例1
function join(a,b){
    var conc ="";
    if(!a){
         conc = "   ";
    }else if(!b){
         for(var i=0; i < a.length;i++){
              conc+=a[i]+"  ";
         }       
    }else{
         for(var i=0; i < a.length;i++){
             conc+=a[i]+b;
         } 
    }
    conc=conc.substring(0,conc.length-2)
    return conc;  
}