Classic Number Tiles Arrangement in Javascript