Print array without brackets and commas

后端 未结 10 789
囚心锁ツ
囚心锁ツ 2020-11-29 23:28

I\'m porting a Hangman game to Android and have met a few problems. The original Java program used the console, so now I have to somehow beautify the output so that it fits

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-30 00:29

    I used join() function like:

    i=new Array("Hi", "Hello", "Cheers", "Greetings");
    i=i.join("");
    

    Which Prints:
    HiHelloCheersGreetings


    See more: Javascript Join - Use Join to Make an Array into a String in Javascript

提交回复
热议问题