title: Figuring out how many rows/columns there should be based off of an int
body: <p>Here is the challenge: </p>
  
  <pre><code>/**
   * Determines how many rows and columns your garden will
   * need to be closest to a square given a number of seeds.
   *
   * @param {number} seedCount - The number of seeds in your
   * seed packet.
   * @return {array} - [rows, columns] needed for your grid
   * layout (for example [4, 5] represents a 4 row x 5 column
   * grid)
  */
  function grid(seedCount) {
  
    // Solution here
  
  }
  </code></pre>
  
  <p>This is NOT coding homework, its one of those coding websites and idk why but this question really has me stumped, I am probably just overthinking it but I would like to know the solution...</p>
  
  <p>EDIT: First solution (Did not work)</p>
  
  <pre><code>function grid(seedCount) {
      /* Enter your solution here! */
      var num1 = Math.sqrt(seedCount)
      num1 = Math.round(num1)
  
      while(seedCount % num1 != 0){
          num1++
  
      }
  
      num2 = seedCount / num1
      var Arr = [num1,num2]
      return Arr 
  }
  
  </code></pre>