I'm trying to figure out why this code does not work
let userName = 'roy';
const userQuestion = 'Do you do CrossFit?';
userName ? console.log('Hello ' + userName + ' !') : console.log('Hello!');
console.log(`The user asked: ${userQuestion}`);
let randomNumber = Math.floor(Math.random() * 8);
let eightBall = '';
console.log(randomNumber);
switch (randomNumber) {
case 0:
eightBall = 'It is certain';
break;
case 1:
eightBall = 'It is defidedly so';
break;
case randomNumber >= 1:
eightBall = 'we cant tell';
break;
}
console.log(` The eight ball answered: ${eightBall}`);
Trying to generate "we can tell" when the number is greater than 1 but it's not printing anything. Am I using a switch statement wrong?