15 lines
316 B
JavaScript
15 lines
316 B
JavaScript
// script.js
|
|
function outputHelloWorld() {
|
|
const app = document.getElementById('app');
|
|
const paragraph = document.createElement('p');
|
|
paragraph.textContent = 'Hello World';
|
|
app.appendChild(paragraph);
|
|
}
|
|
|
|
function repeatOutput() {
|
|
for (let i = 0; i < 5; i++) {
|
|
outputHelloWorld();
|
|
}
|
|
}
|
|
|
|
repeatOutput(); |