JSFiddle - React, Tailwind, and code Playground

by austinnoronha

JavaScript

var count = 0;

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

  if(card >= 2 && card <= 6){
    count += 1;
  }
  else if(card >= 7 && card <= 9){
    
  }
  else{
    count -= 1;
  }

  if(count > 0){
    return count + " Bet";
  }
  else{
    return count + "Hold";
  }

  
  // Only change code above this line
}

var a;
a = cc(7);
a = cc(8);
a = cc(9);
console.log(a)