docs: function(n, m, x){
    var matrix = [];
    for(var i = 0; i < n; i++) {
      matrix[i] = new Array(m);
  
      if(x != null){
        for(var j = 0; j < m; j++){
          matrix[i][j] = x;
        }
      }
    }
  
    return matrix;
  }