Basic JavaScript - Counting Cards

Tell us what’s happening:
Describe your issue in detail here.

For every value only 1 , -1 or 0 is returned for count. Like the result is either 1 bet or 0 hold or -1 hold. What could I have done wrongly?

Your code so far

let count = 0;

function cc(card) {
  // Only change code below this line

  return "Change Me";
  // Only change code above this line

cc(2); cc(3); cc(7); cc('K'); cc('A');

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 11; TECNO PR651E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36

Challenge: Basic JavaScript - Counting Cards

Link to the challenge:

have you tried to write any code for this? the code you posted above doesn’t show any changes.

I don’t write the codes here as I’m using a mobile device. I write the codes on a pc

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.