What is the proper way to declare a JavaScript 2d array? I've tried doing this
var matrix = new Array(new Array(2), new Array(2));
but it doesn't want to work. I am complete javascript beginner so if you can please help me out. Thanks in advance