let Work = [1,2,3,4,5,6,7,8];
Work = null; // Comment out this line to hit the second block of the if statement
function pickRandom(arr) {
if (!arr) return false;
let random = arr[Math.floor(Math.random() * arr.length)];
console.log(random);
return random;
}
if (!Work) {
pickRandom([
'Sleep',
'WoW',
'Eat'
])
} else {
for (let hour in Work) {
console.log(Work[hour])
}
}