[Question]
  [
**The Challenge:**
Draw a rectangle of ASCII boxes: []
**The Rules:**
Takes a width and a height input
You can assume both of these are numbers
Must produce a string with newline characters, \n
**Examples:**
2, 2:
```
[][]
[][]
```
2, 3:
```
[][]
[][]
[][]
```
Fewest Bytes wins.
  
[Answer]
# [SOGL](https://github.com/dzaima/SOGL), 5 [bytes](https://github.com/dzaima/SOGL/blob/master/chartable.md)
```
Ƨ[]*∙
```
Simple:
```
Ƨ[]    push "[]"
   *   multiply horizontally (repeating width times)
    ∙  get an array with input (height) items of that
       implicitly output the array joined with newlines
```
[Answer]
# Mathematica, 26 bytes
```
Grid@Table["[]",{#2},{#}]&
```
[Answer]
# [MATL](https://github.com/lmendo/MATL), 7 bytes
```
v&DiiX"
```
[Try it online!](https://tio.run/##y00syfn/v0zNJTMzQun/f2MuIwA "MATL – Try It Online")
### Explanation
```
v    % Concatenate the (non-existing) stack contents: gives []
&D   % String representation: gives '[]'
ii   % Take two inputs
X"   % Repeat those numbers of times vertically and horizontally. Implicit display
```
[Answer]
# Pyth - ~~7~~ 5 bytes
-2 bytes by a clever trick thanks to insert\_name\_here
```
VE*`Y
```
[Try it here](https://pyth.herokuapp.com/?code=VE%2a%60Y&input=8%0A4&debug=0)
Explanation:
```
VE*`Y
V      # Loop
 E     # <input> number of times
   `Y  # String representation of empty list (used to be "[]", but insert_name_here pointed out this shorter alternative)
  *    # repeat string implicit input number of times
       # implicit print
```
[Answer]
# C, ~~47~~ 46 bytes
```
f(w,h){for(h*=w;h--;)printf(h%w?"[]":"[]\n");}
```
or
```
f(w,h){for(h*=w;h--;)printf("[]%c",h%w?0:10);}
```
My first code golf attempt, did I miss anything obvious?
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
F„[]×,
```
[Try it online!](https://tio.run/##MzBNTDJM/f/f7VHDvOjYw9N1/v834TIGAA "05AB1E – Try It Online")
**Explanation**
Input takes as `height, width`
```
F         # height times do
 „[]      # push "[]"
    ×     # repeat width times
     ,    # print with newline
```
[Answer]
# [;#+](https://github.com/ConorOBrien-Foxx/shp), 197 bytes
```
>;;;;;;~++++++++:>~;;;;:>~*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-::<-::::>-::(;)::>-::*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-:<~<;;;;;-+>-:<-:-(-:::~<-:::(~<#<-;;-#~;)-:<#-::<;>-:-)
```
[Try it online!](https://tio.run/##lY4xDsAgDAP5C0sgytJuIeI9HSt199dpEtEHNBJE9lmG57rXmiMHvEcnQvvqJAoDi@r0owaTL8VII1jC3vyyUClptO3/7HCe3xF2x/uEgiKbCVZNnFWMiNZ4cnhO2lpnOcoL ";#+ – Try It Online") Requires a zero byte after each input number.
I kinda don't know how this works. What I can tell you is that this part of the code:
```
 *(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)-::<-::::>-::(;)::>-::*(-:~<~+-::>-:::<~<-+++++++++~:::<~+-:::>-::*)
```
is parsing the input numbers.
[Answer]
# brainfuck, 145 bytes
```
+++++++++[>++++++++++<-]>+[>+>+<<-]>>++>,>+++++++++[<----->-]<--->>>,>+++++++++[<----->-]<--->++++++++++<[<<<[>+>+<<-]>[<<<.>.>>-]>[<<+>>-]>>.<-]
```
[Try it online!](https://tio.run/##SypKzMxLK03O/v9fGwai7eBMbRvdWDuQgJ22DYgJlLHTQUhH2@iCgJ1uLIhhZ4dHDsnIaBsbG4SRIJ6enZ6dHYStDWbY6QGluP7/NzUFAA)
My first ever code golf! Yay!
The input is in ascii + 48, so in order to do 50, 50 you must input b, b (the ascii letters for 98)
## Explanation
```
+++++++++[>++++++++++<-]>+ Get the opening square bracket into first position
[>+>+<<-] Get it into the second and third position
>>++ Get the third position to be the closing bracket
>
,>+++++++++[<----->-]<--- Get first number into fourth cell
>>>
,>+++++++++[<----->-]<--- Get second number into seventh cell
>++++++++++ get newline into 8th position
<
[ Start our height loop
<<<[>+>+<<-] Get the width into the fifth and sixth positions
>[ Start our width loop at the fifth position
<<<.>. Print the second and third positions
>>-] Decrement the fifth position
>
[<<+>>-] copy the sixth position into the fourth position
>>. print newline
<-]
```
[Answer]
# [J](http://jsoftware.com/), 12 bytes
```
'[]'$~],+:@[
```
[Try it online!](https://tio.run/##LcoxC8IwFATgPb/iECEWY0yjLimCKDiJg2vpEEJKq8UWEx396/G1yHGP4/Hd00zyGnsDLqBgqCuJ001czomXFZ9/K7E0hzJlLLqRaUpB3dBVlAL59NliN26FnF2PEu1zeEdoAW2Yd02Pek14aN0D0U2i//gXbNch@hDhbPDhTxdCEvfWNRnh9AM "J – Try It Online")
## Explanation
```
'[]'$~],+:@[   input: y, x
        +:@[   double y
      ],       pair with x
               this gives (x, 2y)
    $~         shape the left argument into the right argument's shape
'[]'           2-length character string
```
This gives us an `x` by `2y` string of repeating `[]` characters.
[Answer]
# Python 2.7, 32 bytes
Full program:
```
n,m=input()
exec"print'[]'*n;"*m
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P08n1zYzr6C0REOTK7UiNVmpoCgzr0Q9OlZdK89aSSv3/38jHWMA)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 7 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
ẋ⁾[]ẋ$Y
```
A dyadic link returning a list of characters (or a full program printing the result).
**[Try it online!](https://tio.run/##y0rNyan8///hru5HjfuiY4G0SuT///@N/hsDAA)**
### How?
```
ẋ⁾[]ẋ$Y - Main link: number w, number h          e.g. 2, 3
ẋ       - repeat w h times                            [2,2,2]
     $  - last two links as a monad:
 ⁾[]    -   literal ['[',']'],                        "[]"
    ẋ   -   repeat list (vectorises)                  ["[][]","[][]","[][]"]
      Y - join with newlines                          "[][]\n[][]\n[][]"
        - if a full program, implicit print
```
[Answer]
# [Retina](https://github.com/m-ender/retina), 32 bytes
```
.+
$*
1(?=1*(¶1+))|.
$1
G`1
1
[]
```
[Try it online!](https://tio.run/##K0otycxL/P9fT5tLRYvLUMPe1lBL49A2Q21NzRo9LhVDLvcEQy5DrujY//@NuYwA "Retina – Try It Online") Takes height and width input on separate lines.
[Answer]
# [Python 3](https://docs.python.org/3/), 26 bytes
```
lambda n,m:('[]'*n+'\n')*m
```
[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSFPJ9dKQz06Vl0rT1s9Jk9dUyv3f0FRZl6JRpqGkY6xpuZ/dWVlBSAEkepcxgA "Python 3 – Try It Online")
[Answer]
# [V](https://github.com/DJMcMayhem/V), 7 bytes
```
Ài[]<esc>ÀÄ
```
where `<esc>` is `0x1b`.
[Try it online!](https://tio.run/##K/v//3BDZnSs9OGGwy3///83@W8KAA "V – Try It Online")
### Explanation
```
Ài[]<esc>                    " arg1 times insert []
         ÀÄ                  " arg2 times duplicate this line
```
[Answer]
# [Ohm](https://github.com/nickbclifford/Ohm), 9 bytes
```
M"[]"┘ÄJ,    
```
[Try it online!](https://tio.run/##y8/I/f/fVyk6VunRlBmHW7x0/v834jIGAA "Ohm – Try It Online")
### Explanation
```
M"[]"┘ÄJ,
M         //Executes code input1 times
 "[]"     //Pushes []
     ┘Ä   //Duplicates [] input2 times
       J  //Joins the stack
        , //Prints with a trailing newline
```
[Answer]
# PowerShell, 25 Bytes
```
param($w,$h),("[]"*$w)*$h
```
-3 thanks to Mathias!
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~13~~ 12+1= ~~14~~ 13 bytes
+1 for the `-R` flag.
```
"[]"pN× òU*2
```
[Try it online](http://ethproductions.github.io/japt/?v=1.4.5&code=IltdInBO1yDyVSoy&input=NSw2Ci1S)
* 1 byte saved thanks to obarakon.
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 11 bytes
```
'[]'⍴⍨⊢,2×⊣
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@lR2wT16Fj1R71bHvWueNS1SMfo8PRHXYv//zdSSFIw4jIGkQA "APL (Dyalog Unicode) – Try It Online")
`'[]'` the string
`⍴⍨` cyclically repeated to fill the shape
`⊢` right argument (rows)
`,` and
`2×` twice
`⊣` the left argument (columns)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~8~~ 7 bytes
```
ＥＮ×[]Ｉη
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMM3sUDDM6@gtMSvNDcptUhDU0chJDM3tVhDKTpWSUfBObG4RCNDU1PT@v9/Iy7j/7plOQA "Charcoal – Try It Online") Link is to verbose version of code. Takes input in the order height, width. Charcoal's drawing primitives aren't suited to this, so this just takes the easy way out and repeats the `[]` string appropriately. Explanation:
```
 Ｎ      First input as a number
Ｅ       Map over implcit range
      η Second input
     Ｉ  Cast to number
   []   Literal string
  ×     Repeat
        Implicitly print on separate lines
```
[Answer]
# [R](https://www.r-project.org/), 70 bytes
```
p=paste
function(w,h)p(rep(p(rep('[]',w),collapse=''),h),collapse='
')
```
[Try it online!](https://tio.run/##K/r/v8C2ILG4JJUrzTatNC@5JDM/T6NcJ0OzQKMotUADQqpHx6rrlGvqJOfn5CQWFKfaqqtrApUg8WPy1DX/p2kY65hocqVpGOkYaf4HAA "R – Try It Online")
Returns an anonymous function that constructs and returns the string.
## 45 bytes, non-conforming
```
function(w,h)write(matrix('[]',w,h),'',w,,'')
```
An anonymous function that prints out the string in the desired format.
[Try this online](https://tio.run/##K/qfZvs/rTQvuSQzP0@jXCdDs7wosyRVIzexpCizQkM9OlZdBySqow6igaTm/zQNYx0TTa40DSMdI83/AA)
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 7 bytes
6 bytes of code, +1 for the `-R` flag.
```
VÆç"[]
```
Doesn't work in the latest version due to a bug with `ç`, but it does work in [commit `f619c52`](https://github.com/ETHproductions/japt/tree/f619c52d28277eaf279903146e832360384acb02). [Test it online!](http://ethproductions.github.io/japt/?v=f619c52d28277eaf279903146e832360384acb02&code=VsbnIltd&input=MiAzIC1S)
### Explanation
```
VÆ   ç"[]
VoX{Uç"[]"}  // Ungolfed
             // Implicit: U, V = input integers
VoX{      }  // Create the range [0...V) and replace each item X with
    Uç"[]"   //   U copies of the string "[]".
-R           // Join the result with newlines.
             // Implicit: output result of last expression
```
[Answer]
# [Go](https://golang.org/), 74 bytes
```
import."strings"
func(x,y int)string{return Repeat(Repeat("[]",x)+"\n",y)}
```
[Try it online!](https://tio.run/##nZDBasQwDETv/orBp3gbNrC9FfoPpde2B69jB9NYDrYMG5b99qyTlFJoTxUCwQyMnjTEZdLmUw8WQXsSojvAxN7C5zpDsMS2x9kaXXIVedU11Y40h1gyXCHDPtLiwxQTH2Xm5GnIUqxOc2lneGK1q9dkuSTCq52s5uZryLcP2V7Ug3wn2c7qthw6IfY4SBdYoutAkVER@poGbbjoceNsEWmc4WIC28x1h/gFspFs5zUKV4FaDk/P@DfgypN1sN/Hg2P90c73E2XfFfj4UsN5pMY1pxYnpf42HqtxW@4 "Go – Try It Online")
[Answer]
## [QBIC](https://drive.google.com/drive/folders/0B0R1Jgqp8Gg4cVJCZkRkdEthZDQ), 14 bytes
```
[:|?[:|?@[]`';
```
Explanation:
```
[:|     FOR a = 1 to (read input from cmd line)
?       PRINT a newlne
[:|     FOR c = 1 to (read input from cmd line)
?@[]`   PRINT A$ (containing the box)
';         and inject a semicolon in the compiled QBasic code to suppress newlines
```
This takes its arguments in the order of #rows, #cols. Output starts with a newline.
[Answer]
## Pyke, 8 bytes
```
}A;**"[]
```
[Try it here!](http://pyke.catbus.co.uk/?code=%7DA%3B%2a%2a%22%5B%5D&input=5%0A3)
Also 8 bytes:
```
 F2K*"[]
```
[Try it here!](http://pyke.catbus.co.uk/?code=+F2K%2a%22%5B%5D&input=5%0A3)
[Answer]
# [Bash](https://www.gnu.org/software/bash/), 55 bytes
```
seq $(($1*$2))|sed s/.*/[]/|tr -d "
"|fold -w $(($1*2))
```
[Try it online!](https://tio.run/##S0oszvj/vzi1UEFFQ0PFUEvFSFOzpjg1RaFYX09LPzpWv6akSEE3RUGJS6kmLT8nRUG3HKoSqPD////G/00A "Bash – Try It Online") Uses the TIO flavor of bash, since I run windows.
[Answer]
## C#, 78 bytes
```
(w,h)=>"".PadLeft(h).Replace(" ","".PadLeft(w).Replace(" ","[]")+'\n').Trim();
```
[Run in C# Pad](http://csharppad.com/gist/333b511ae47260be12c20bea40d4981c)
This is shorter than with for-loops and I'm not aware of any function in C# which can repeat with less code.
[Answer]
## CJam, 10 bytes
```
l~"[]"*N+*
```
 
[Answer]
# JavaScript (ES6), ~~43~~ 36 bytes
From the comments, a trailing newline is now permitted.
```
w=>h=>("[]".repeat(w)+`
`).repeat(h)
```
---
## Try it
```
f=
w=>h=>("[]".repeat(w)+`
`).repeat(h)
oninput=_=>o.innerText=f(+i.value)(+j.value);o.innerText=f(i.value=2)(j.value=2)
```
```
*{font-family:sans-serif;}
input{margin:0 5px 0 0;width:50px;}
```
```
<label for=i>w: </label><input id=i type=number><label for=j>h: </label><input id=j type=number><pre id=o>
```
[Answer]
# [J](http://jsoftware.com/), 11 bytes
```
,./@$'[]'"0
```
[Try it online!](https://tio.run/##y/r/P81WT0FHT99BRT06Vl3J4H9qcka@QpqCqYIhF5RppGAMYxoqmPwHAA)
[Answer]
# [Canvas](https://github.com/dzaima/Canvas), 4 [bytes](https://github.com/dzaima/Canvas/blob/master/files/chartable.md)
```
[]×＊
```
[Try it here!](https://dzaima.github.io/Canvas/?u=JTVCJTVEJUQ3JXVGRjBB,i=MiUwQTM_,v=7)
]