added words to array, simple console log to display them for now

This commit is contained in:
2025-08-28 10:06:38 -04:00
parent 274b19f2a9
commit c8cd997d23

View File

@@ -1,12 +1,14 @@
const words = [ const words = [
'red', 'red',
'car', 'car',
'bed' 'bed',
'hat',
'cat',
'mat',
'pet',
'bin',
'run',
'bun'
]; ];
function getRandomWord() { console.log( words[2] );
console.log('function triggered');
return words[(Math.random() * (3 - 1) + 1)];
}
console.log( getRandomWord() );