Keeping Score Using BehaviorSubject

Learn to add the score through the BehaviorSubject and the scan operator.

What kind of game would it be if we couldn’t brag about our results to our friends? We obviously need a way to keep track of how well we did. We need a score.

Let’s make a simple helper function to draw the score on the top left of the screen:

Get hands-on with 1200+ tech skills courses.