---
Code:
class Minefield {
/* Construct a minefield with the given width, height, and the number of mines. */
constructor(width, height, mines) {
/* Sanitize input parameters. */
width = Number(width);
height = Number(height);
mines = Number(mines);