Counting Cards challenge, javascript doubt


Challenge : freeCodeCamp Challenge Guide: Counting Cards
Hello everyone, i’m still trying to figure out why on this code:

// Note: Only the last will display
cc(7); cc(8); cc(9); cc('K'); cc('A');

why only the last value is going to show.
Someone can help me? :grin:


Try running it somewhere else. I think that its because the freecodecamp people did something behind the scenes. I wouldn’t wory about it too much.

You should ask this question as a seperate thread, because I’ve noticed that it
applies to many exercises, and you probably won’t get that many people who know the reason in this one.


Well, i wrote using “document.write()”, and it showed everything, yep they did something, thanks for helping!
I thought that my logic was broken. :sweat_smile:


Can someone explain the challenge? I didn’t understand the challenge only?