Generating More Tiles
You will use procedural generation in this piece of code to create new tiles. You will need to use Math.floor and Math.random to create a random height for each new tile. By using the new operator with the floor function, you can add new tiles to the screen. Using a loop with the function clearOldTiles will stop too many tiles clogging up the browserâ€™s memory.