7.More practice with switch


#1



var answer = prompt("whats your eye color?");

switch(answer) {
  case 'blue':
    console.log("i like blue");
    break;
  // Add your code here!
  case 'brown':
  console.log("brown is nice:)");
  break;
  
  case 'green':
  console.log("so are mine!");
  break;
  
  default:
  console.log("are you making that up??");
  
}

again shows me: TypeError: prompt is not a function.
whats going on??


#2

@microrockstar63833,
Either you have your PopUp disabled......
or
you will have to do a refresh Browser

++++ reset of session *****************
As you are manipulating with objects
under certain circumstances you can shoot your Browser in an
inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code
Then use the Reset Code button of the course-window,
then paste your code back in.

Addendum
General Notes:
Always refresh the browser after making corrections:
CTRL f5 ( if on Windows or Linux)
CMD r ( if on a MAC).
CTRL 0 to reset browser zoom


#3

i did a refresh browser.
i even closed it and reopen the site.
copied your link, everithing you've said.
didn't work.
still writes : " TypeError: prompt is not a function".
you sure that the problem is not at your end?


#4

What about ad/pop-up blockers are all of them disabled? Did you try switching the browser?


#5

that worked! thanks!