Add script.js
This commit is contained in:
15
script.js
Normal file
15
script.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// 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();
|
||||||
Reference in New Issue
Block a user