added words to array, simple console log to display them for now
This commit is contained in:
16
wally/app.js
16
wally/app.js
@@ -1,12 +1,14 @@
|
||||
const words = [
|
||||
'red',
|
||||
'car',
|
||||
'bed'
|
||||
'bed',
|
||||
'hat',
|
||||
'cat',
|
||||
'mat',
|
||||
'pet',
|
||||
'bin',
|
||||
'run',
|
||||
'bun'
|
||||
];
|
||||
|
||||
function getRandomWord() {
|
||||
console.log('function triggered');
|
||||
return words[(Math.random() * (3 - 1) + 1)];
|
||||
}
|
||||
|
||||
console.log( getRandomWord() );
|
||||
console.log( words[2] );
|
Reference in New Issue
Block a user