loading

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.12437605018510012","path":"main.js","file":{"path":"main.js","content":{"asEncoding":{"base64":"dmFyIGNvdW50ID0gMDsKCmZ1bmN0aW9uIGNjKGNhcmQpIHsKICAvLyBPbmx5IGNoYW5nZSBjb2RlIGJlbG93IHRoaXMgbGluZQogIHN3aXRjaChjYXJkKXsKICAgIGNhc2UgMjoKICAgIGNhc2UgMzoKICAgIGNhc2UgNDoKICAgIGNhc2UgNToKICAgIGNhc2UgNjoKICAgICAgY291bnQrKzsKICAgICAgYnJlYWs7CiAgICBjYXNlIDEwOgogICAgY2FzZSAnSic6CiAgICBjYXNlICdRJzoKICAgIGNhc2UgJ0snOgogICAgY2FzZSAnQSc6CiAgICAgIGNvdW50LS07CiAgICAgIGJyZWFrOwogIH0KICBpZihjb3VudD4wKXsKICAgIHJldHVybiBjb3VudCArICIgQmV0IjsKICB9CiAgZWxzZXsKICAgIHJldHVybiBjb3VudCArICIgSG9sZCI7CiAgfQogIC8vIE9ubHkgY2hhbmdlIGNvZGUgYWJvdmUgdGhpcyBsaW5lCn0KCi8vIEFkZC9yZW1vdmUgY2FsbHMgdG8gdGVzdCB5b3VyIGZ1bmN0aW9uLgovLyBOb3RlOiBPbmx5IHRoZSBsYXN0IHdpbGwgZGlzcGxheQpjb25zb2xlLmxvZyhjYygyKSk7CmNvbnNvbGUubG9nKGNjKDMpKTsKY29uc29sZS5sb2coY2MoNykpOwpjb25zb2xlLmxvZyhjYygnSycpKTsKY29uc29sZS5sb2coY2MoJ0EnKSk7Cgo="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 10:
    case 'J':
    case 'Q':
    case 'K':
    case 'A':
      count--;
      break;
  }
  if(count>0){
    return count + " Bet";
  }
  else{
    return count + " Hold";
  }
  // Only change code above this line
}

// Add/remove calls to test your function.
// Note: Only the last will display
console.log(cc(2));
console.log(cc(3));
console.log(cc(7));
console.log(cc('K'));
console.log(cc('A'));

Native Browser JavaScript