x
 
1
<!DOCTYPE html>
2
<title>My Example</title>
3
4
5
<p id="msg"></p>
6
7
<script>
8
  var cities =  ["Sydney", "Tokyo", "Miami", "Auckland"];
9
  document.getElementById("msg").innerHTML = cities.join("-");
10
</script>