I am making a crosswords and i am having a bit of a problem.
In jQuery I have some variables, which tells me whether the field is black or white (0,1). Each type of crosswords have different pattern.
What I would like to do is, get a var (in my case "vel") from url (the number part: 501, 502...) and combine it with text "oblika" which would tell which "oblika" which array must be used.
// Works fine
var oblika = oblika501;
Does not work as it should (it returns string instead of "link" to the array below)
var oblika = "oblika"+vel;
var oblika501 = [[0, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1],[1, 1, 1, 1, 1], [0, 1, 1, 1, 0]];
var oblika502 = [[1, 1, 1, 0, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1],[1, 1, 1, 1, 1], [0, 0, 1, 1, 1]];
Is there any workaround, or did I miss something?