W3Schools.com

VBScript Join Function


VBScript Reference Complete VBScript Reference

The Join function returns a string that consists of a number of substrings in an array.

Syntax

Join(list[,delimiter])

Parameter Description
list Required. A one-dimensional array that contains the substrings to be joined
delimiter Optional. The character(s) used to separate the substrings in the returned string. Default is the space character

Example

Example

Separating items in an array, with and without using the delimeter parameter:

<script type="text/vbscript">

days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
document.write(Join(days) & "<br />")
document.write(Join(days,",") & "<br />")
document.write(Join(days," ### "))

</script>

The output of the code above will be:

Sun Mon Tue Wed Thu Fri Sat
Sun,Mon,Tue,Wed,Thu,Fri,Sat
Sun ### Mon ### Tue ### Wed ### Thu ### Fri ### Sat

Try it yourself »

VBScript Reference Complete VBScript Reference
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE