scrimba
Frontend Career Path
Making websites interactive
Blackjack
Link to stylesheet
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Link to stylesheet
Expand for more info
index.js
run
preview
console
let firstCard = 10
let secondCard = 4
let sum = firstCard + secondCard
let hasBlackJack = false
let isAlive = true
let message = ""

if (sum <= 20) {
message = "Do you want to draw a new card? 🙂"
} else if (sum === 21) {
message = "Wohoo! You've got Blackjack! 🥳"
hasBlackJack = true
} else {
message = "You're out of the game! 😭"
isAlive = false
}

console.log(message)
Console
"Do you want to draw a new card? 🙂"
,
/index.html
-2:32