Added "hello" text
This commit is contained in:
3
main.js
3
main.js
@ -1,8 +1,11 @@
|
||||
const Maths = Math; // Yes, I'm that patriotic.
|
||||
const hellos = ['Hewwo!', 'Hello!', 'Awoo!'];
|
||||
|
||||
function pickRandom(array) {
|
||||
return array[Maths.floor(Maths.random() * array.length)];
|
||||
}
|
||||
|
||||
window.addEventListener('load', (e) => {
|
||||
const helloText = document.getElementById('helloText');
|
||||
helloText.innerText = pickRandom(hellos);
|
||||
});
|
||||
Reference in New Issue
Block a user