Files
gallery/assets/js/haiku.js
Ryan Chou 22ca3d3e4b
All checks were successful
Deploy on push / deploy (push) Has been skipped
m -> v
2026-03-22 18:51:24 -07:00

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();
});