<html>
<body>
<h1>JavaScript Strings</h1>
<h2>The repeat() Method</h2>
<p>repeat() returns a new string with a number of copies of a string:</p>
<p id="demo"></p>
<p>repeat() is not supported in Internet Explorer.</p>
<script>
let text = "Hello world!";
let result = text.repeat(4);
document.getElementById("demo").innerHTML = result;
</script>
</body>
</html>