配列の要素を連結して出力

Contents

出力結果

a,b,c

プログラム例

JavaScript

array = ['a', 'b', 'c'];
console.log(array.join(","));

Perl

my @array = ("a", "b", "c");
print join(",", @array)."\n";

PHP

<?php
$array = ["a", "b", "c"];
print(implode(",", $array)."\n");

Python

array = ["a", "b", "c"]
print(",".join(array))

Ruby

array = ['a', 'b', 'c']
print(array.join(',') + "\n")

[rankingPart]