Help me with this code


#1

var userChoice = confirm("would you like to flip a coin")

var userCoin = Math.random();
if (userCoin >= 0.5){
console.log("You got heads!")
}else{
console.log("You got tails!")
}

var secondChoice = comfirm("would you like to pick a card")
var card = [1,2,3,4,5,6,7,8,9,10,"Jack","Queen","King"];

var suit = ["Hearts","Spades","Diamonds","Clubs"];

var cardPick = card[Math.floor(Math.random() * card.length)];

var suitPick = suit[Math.floor(Math.random() * suit.length)];

console.log("You got " + cardPick + " of " + suitPick);

}

this code is to flip a coin and to pick a random card ,, allow tell me the answer


#2

remove the brace the the end

also

you misspelt confirm