Workshop › 2048 › Step 6 of 26
1024 in 40-pixel letters does not fit in its cell. Bigger numbers get smaller text: 40 below 100, 34 below 1000, 26
otherwise.
```js
ctx.font = 'bold ' + (value < 100 ? 40 : value < 1000 ? 34 : 26) + 'px sans-serif'
```? :: the first true condition wins. The size is then glued into the font text: 'bold 34px sans-serif'.Replace the font line in the if block.
Skills: Drawing on a canvas
← Numbers on the tiles Find the empty cells →