Switch mode prints incorrectly

I’m working on the Magic Eight Ball project. I put in 5 switch options, Pharmacist, Software Engineer, Doctor, Application Engineer, and Optometrist. When I click start, sometimes it says "Hello!
The user asked What career should I take?
You should become: ". It’s blank. But it works sometimes. Why is this?
My code:

let userName = ''

userName ? (Hello, ${userName}!) : console.log(‘Hello!’);

let userQuestion = ‘What career should I take?’;
console.log(The user asked ${userQuestion});

let randomNumber = Math.floor(Math.random() * 8);

let eightBall = ''

switch (randomNumber) {
** case 0:**
** eighBall = ‘Pharmacist’;**
** break;**
** case 1: **
** eightBall = ‘Doctor’;**
** break;**
** case 2: **
** eightBall = ‘Software Engineer’;**
** break;**
** case 3:**
** eightBall = ‘Application Engineer’**
** break;**
** case 4:**
** eightBall = ‘Optometrist’**
** break;**
}

console.log(You should become: ${eightBall});

(Ignore the **, bolding broke.)
Thanks.

Hi,
you can format your code by marking the whole code and press </> in the editor.

  1. You should tell the computer whether it should assign a value or compare it to another:
    ‘=’ = assignment operator, ‘==’ = comparison operator, ‘===’ = strict comparison operator
  2. Wrap your switch statement in a function. Then you can pass the random number to the function call.
  3. You should also define a default case.