Counting Cards unexpected character

Please can someone help me figure out what is wrong with my code! The output has a problem with using “ for inputting strings stating I’ve used an unexpected character?

var count = 0;

function cc(card) {
  // Only change code below this line
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      count ++;
    case 10:
    case “J”:
    case “Q”:
    case “K”:
    case “A”:
      count --;
  if (count > 0) {
    return (count + “ Bet”);
  } else {
    return (count + “ Hold”);
  // Only change code above this line

// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(3); cc(4); cc(5); cc(6);

Your browser information:

User Agent is: Mozilla/5.0 (iPad; CPU OS 11_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1.

Link to the challenge:

I suspect it might be those fancy quote marks.

Use the ugly ones instead. Either " or '.

They’re just the ones inputted from an iPad :pensive: may have to wait till I’m on the computer to fix it, thankyou !

On Apple mobile devices, you need to turn off “smart punctuation” (or something like that) in the device settings.

1 Like