Skip to content

Instantly share code, notes, and snippets.

@fushihara
Created May 4, 2012 19:12
Show Gist options
  • Save fushihara/2597093 to your computer and use it in GitHub Desktop.
Save fushihara/2597093 to your computer and use it in GitHub Desktop.
join用の配列を作らずに文字列をjoinする ref: http://qiita.com/items/e04937a6f53df0f2058e
data=["あ","い","う"];
res="";join=" ";
for(i=0;i<data.length;i++){
res+=(res!="")?join:"";
res+=data[i];
}
res;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment