Search w3schools.com:

SHARE THIS PAGE

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

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]