Today’s exercise was custom-signs which was all about template strings and ternary operators (a one-line if statement). It went pretty quick. They explained that you could embed multiple lines in one template string, so I did that. You have to move the next line of text back to column zero, I found out that the hard way. The community solution I first landed on used \n instead. Easier but I was trying to follow the stuff we were supposed to be learning.

The part that really got to me was the decimal formatting for the sign cost. They wanted a two digit decimal. I went and found toFixed() which looked like it would work, and it did. Then I got to the community solutions and noticed they just put .00 after the cost calculation. Granted if you think about it there was no possibility for anything other than zero cents but it still feels awful to code it that way.

Ok, I might do another one, but I finished the Vue tutorial that I was watching. I really wanted some actual progress on the minesweeper part and moved the board code over to the actual project. Right now the settings are hard coded. After some hacking I got it to let you right click on a square to flag/unflag it, and left click it to open the square. You can’t win or lose yet but it is finally moving.