VBScript Join Function
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:
<%
days=Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat")
response.write(Join(days) & "<br />")
response.write(Join(days,",") & "<br />")
response.write(Join(days," ### "))
%>
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
Show Example »
Complete VBScript Reference