Basic JavaScript Question:
Download Questions PDF

How to use "join()" to create a string from an array using JavaScript?


"join" concatenates the array elements with a specified separator between them in JavaScript.

<script type="text/javascript">
var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"];

This produces

Download JavaScript Interview Questions And Answers PDF

Previous QuestionNext Question
How to use strings as array indexes using JavaScript? How to make a array as a stack using JavaScript?