Search:

Type: Posts; User: bbr201

Search: Search took 0.12 seconds.

  1. Replies
    5
    Views
    1,856

    Re: Why am I getting this output?

    And you added the breaks for the second switch statement also?

    switch(j){
    case 1: card = card.concat("of Hearts"); break;
    case 2: card = card.concat("of Diamonds"); break;
    ...

    If so,...
  2. Replies
    5
    Views
    1,856

    Re: Why am I getting this output?

    If you use switch/case you should add a break after every case, otherwise it will fall through to the other cases.

    switch(i){
    case 1: card = card.concat("Two "); break;

    case 2: card =...
Results 1 to 2 of 2