Quantcast
Channel: Splitting address field using the Split function which contains commas
Viewing all articles
Browse latest Browse all 6

Re: Splitting address field using the Split function which contains commas

$
0
0

Hi Moodhi,

The join() method joins the elements of an array into a string, and returns the string. The elements will be separated by a specified separator. The default separator is comma (,).

For example:

function myFunction() {
    var Address = ["01 My Street", "My Town", "My City", "My PostCode"];
    var x = document.getElementById("demo");
    x.innerHTML = Address.join();
}

The result is 01 My Street,My Town,My City,My PostCode.

Please see: http://www.w3schools.com/jsref/jsref_join.asp

Best Regards,

Candice Zhou


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>