Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me
All your queries regarding JavaScript will be solved in this forum
  • Page:
  • 1
TOPIC:

join()

join() 1 year, 4 months ago #441

  • kate
  • OFFLINE
  • Senior Boarder
  • Posts: 47
  • Karma: 0
Can anybody guide me..

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

Re: join() 1 year, 4 months ago #478

  • kuldeep
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 0
"join" concatenates the array elements with a specified separator between them.

<s-cript type="text/j-avascript">
var days = ["Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday"];
document.write("days:"+days.join(","));
</script>

This produces
days:Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
  • Page:
  • 1
Time to create page: 1.14 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download