BlackJack

CardGame


var ranks = ['2','3','4','5','6','7','8','9','10','J','Q','K','A']; var deck = []; for(var suitCounter = 0; suitCounter < 4; suitCounter++){ console.log(suit[suitCounter]); } deck.push(suits[suitCounter]); } } console.log(deck);


const cards =[]; card [2] = "2"; card [3] = "3"; card [4] = "4"; card [5] = "5"; card [6] = "6"; card [7] = "7"; card [8] = "8"; card [9] = "9"; card [10] = "10"; card [Ace] = "11"; card [King] = "10"; card [Queen] = "10"; card [Jack] = "10";
const win = "

Every time you click the button, getconst cards(min, max) returns a random number between 2 and 15(both included 2,15):

"; { const game = "button onclick="document.getElementById('demo').innerHTML = const cards(2,15)">Pick one Cards"; const game = "button onclick="document.getElementById('demo').innerHTML = const cards(2,15)">pick another Card" { if (win = 11) { console.log("You Got an Ace Card, Your Card Value is 11 "); if (game==12){ console.log("You got a King Card, Your Card Value is 10"); } else if (game==13){ console.log("You Got a Queen Card, Your Card Value is 10"); }else if (game==14){ console.log("You Got a Jack Card, Your Card Value is 10); }

var ( if (Queen + Ace ) console.log("BlackJack"); let Jack = 10, Queen = 10, King= 10, Ace= 11; console.log