"jaxim" wrote:
How do you convert an array to a string?
I've tried to look thru the documentation for answers but it seems a bit lacking
https://sdkdocs.roku.com/display/sdkdoc/roArray
var monthNames = ['Jan', 'Feb', 'Mar', 'Apr'];
var myVar = monthNames.toString(); // assigns 'Jan,Feb,Mar,Apr' to myVar.
"jaxim" wrote:
Using JavaScript as an example, I would like to convert the values contained in an array to a comma delineated string like the following:var monthNames = ['Jan', 'Feb', 'Mar', 'Apr'];
var myVar = monthNames.toString(); // assigns 'Jan,Feb,Mar,Apr' to myVar.
myVar = "" : for each ms in monthNames : myVar += "," + ms : end for : myVar = myVar.Mid(1)
print myVar
"jaxim" wrote:
Using JavaScript as an example, I would like to convert the values contained in an array to a comma delineated string