Join method with different parameters
<html>
<head>
<title>Array literal</title>
<script type="text/javascript" >
var planets = ['A', 'B', 'C'];
var word = planets.join('');
document.write(word);
document.write("<BR>");
var list = planets.join();
document.write(list);
document.write("<BR>");
var sentence = planets.join(' then ');
document.write(sentence);
</script>
</head>
<body>
</body>
</html>
Related examples in the same category