<!DOCTYPE html>
<title>My Example</title>
<p id="msg"></p>
<script>
var cities = ["Sydney", "Tokyo", "Miami", "Auckland"];
document.getElementById("msg").innerHTML = cities.join("-");
</script>