Courses
All courses
AI Path
Frontend Path
Pricing
Courses
Log in
For Teams
Courses
All courses
AI Path
Frontend Path
Pricing
Pricing
Create Account
Log in
Go Pro!
Courses
All courses
AI Path
Frontend Path
Karma
Dashboard
Connect to Discord
Find a course
Settings
New scrim
Log out
Build a Blackjack game
This playlist is part of
Learn JavaScript
Build a Blackjack game
54 lessons
2 hours 40 min
1. Let's build a Blackjack game!
0:57
2. Add the firstCard, secondCard, and sum
0:52
3. If...else conditionals
5:39
4. Your first if...else statement
2:53
5. if/else...if/else statement
3:21
6. The if...else statement for our game
1:59
7. Add the hasBlackJack variable
2:03
8. Add the isAlive variable
1:44
9. Let's practice boolean conditions
3:25
10. Add the message variable
3:21
11. Link to stylesheet
2:32
12. Add basic styling
4:18
13. Make the start button work
5:49
14. Display the message
2:32
15. Display the sum
5:43
16. Display the cards
1:53
17. New card button
3:39
18. Add to the sum when newCard is clicked
3:16
19. Rename the startGame function
2:11
20. Solving our cards problem with an array
3:16
21. Aside: Intro to arrays
5:24
22. Aside: Array indexes
4:03
23. Arrays with multiple data types
2:18
24. Aside: Array.push() and .pop()
4:20
25. Creating the cards array
1:04
26. Push a new card to the array
1:18
27. Aside: Loops
4:01
28. Write your first loop
3:22
29. Aside: For loops and arrays
3:43
30. Write your first array-based for loop
1:29
31. For loops, arrays, and DOM
2:55
32. Use a loop to render cards
2:16
33. How can we avoid to hard-code card values?
1:31
34. Aside: Returning values in functions
4:59
35. Use a function to set the card values
3:06
36. Aside: Math.random()
4:15
37. Math.random() * 6
1:43
38. Flooring the number with Math.floor()
1:24
39. Using Math.random() and Math.floor() to create a dice
1:40
40. Completing our dice function
2:37
41. Make getRandomCard() work
2:54
42. Complete getRandomNumber function
3:02
43. Assign values in the startGame function
2:42
44. Our new card feature is broken
0:59
45. Aside: The AND operator (&&)
3:41
46. Write your first logical operator
2:04
47. Aside: The OR operator (||)
3:02
48. Only trigger newCard() if you're allowed to
1:27
49. Object sneak peek
4:32
50. Aside: Intro to objects
4:43
51. Create your first object
3:15
52. Use an object to store player data
2:37
53. Methods on object
1:58
54. Congrats & recap
4:24