<script>
let myString = "The quick brown fox";
document.write ("The string has " + myString.length + " characters.");
myString = myString + " jumped over the lazy dog.";
document.write ("<br>The string now has " + myString.length + " characters.");
const star = 'Aldebaran';
const constellation = "Taurus";
const sentence = `${star} is a star in the constellation ${constellation}`;
document.write("<div style='color:blue;'>" + sentence + "</div>");
</script>
<div style="color:Red; margin-top:10px;">
<script>
var cities = "Berlin, Hamburg, Munich, Frankfurt, Dresden, Stuttgart";
var cityArray = cities.split(", ");
for(let i = 0; i < cityArray.length; ++i){
document.write("<br> City #" + i + " = " + cityArray[i]); }
</script>
</div>
<div style="color:Purple; margin-top:10px;">
<script>
var regexp = /bu/;
var found = cities.search(regexp);
document.write(cities + "<br>");
if(found != -1)
document.write("First <b>bu</b> pattern found at position: " + found);
else
document.write("Pattern not found.");
</script>
</div>
<div style="color:RoyalBlue; margin-top:10px;">
<script>
var cities2 = cities.replace(/u/g, "*");
document.write ("Cities: " + cities);
document.write ("<br>Modified cities: " + cities2);
</script>
</div>