Consider the following JavaScript code:
````
function generateShape(integer) {
  let output = ""; 
  output += "+".repeat(integer) + " ";
  output += output.repeat(integer - 1);
  return output.slice(0, -1).split(" ").join("\n");
}
````
The goal is to return a "integer x integer" square, composed by "+" characters. Can this code be optimized? Provide response in all capital letters, no lowercase letters allowed.
user