Get help on our basic JavaScript and Algorithms Challenges. If you are posting code that is large use Gist - https://gist.github.com/ paste the link here.
thecodingaviator on master
remove A (#31157) (compare)
var count = 0;
function cc(card) {
// Only change code below this line
switch(card){
case 2:
case 3:
case 4:
case 5:
case 6:
count ++;
break;
case 7:
case 8:
case 9:
break;
case 10:
case "J":
case "Q":
case "K":
case "A":
count --;
break;
}
if (count<1)
{
return count+" Hold";
}
else if (count>1){
return count+" Bet";
}
// Only change code above this line
}
// Add/remove calls to test your function.
// Note: Only the last will display
cc(2); cc(2); cc(10);
chocochip15 sends brownie points to @chrono79 :sparkles: :thumbsup: :sparkles:
function titleCase(str) {
return str.split(" ")[0].toUpperCase().join(" ");
}
titleCase("I'm a little tea pot");
tejanth sends brownie points to @suyang581 :sparkles: :thumbsup: :sparkles: