Score Keeper Project

Hi, i wanted to expand my simple score keeper project by tracking the number of wins of both players. However, when i added those simple variables to track the number of wins in my “whenWin” function, the application stopped working properly.
My question is, why does adding such seemingly innocuous code cause such unexpected changes?

Also, i tried to put the my HTML in a flex container with the id “container” and the content got scrambled up and disorganised for some reason (its currently commented out aswell)

I would appreciate some help, thank you!

p1WinsSpan.textContent = p1Wins;
Missing s

1 Like

Thank you, that was a silly mistake! What about in regard to the flex container, do you know why it jumbles up the content like that?

Different elements are displayed differently by default: headings (h1-h6) are displayed on a new row, but buttons and inputs on the same row.

When you set display: flex it overrides those default settings. By default flex sets everything on one row.

2 Likes