I am struggling to randomly select some divs (9 in this case) to place bombs/mines for those selected tiles.

My code for this is:

```
    function place_mines() {

    if (document.getElementById("difficulty").selectedIndex == "2") {

        for (var u = 0; u < 8; u++) {

        }

    }
}

```

[![enter image description here](https://i.stack.imgur.com/EZ3bf.png)](https://i.stack.imgur.com/EZ3bf.png)
Inspected the element, grid which contains all the tiles.