19 lines
642 B
JavaScript
Executable File
19 lines
642 B
JavaScript
Executable File
document.addEventListener('DOMContentLoaded', function () {
|
|
const haikus = [
|
|
"every single meal\ni have ever\nenjoyed with you",
|
|
"because food is only\nenjoyable with you around\nily",
|
|
];
|
|
|
|
function getRandomHaiku() {
|
|
const index = Math.floor(Math.random() * haikus.length);
|
|
return haikus[index];
|
|
}
|
|
|
|
function displayHaiku() {
|
|
const quoteElement = document.getElementById('haiku');
|
|
quoteElement.innerText = getRandomHaiku();
|
|
}
|
|
|
|
displayHaiku();
|
|
});
|