fleter Posted September 17, 2014 Share Posted September 17, 2014 hey guys, i need your help. I would like to transform data from 2-D array in 1-D, but I have some problems. The browser sholud write an array called "razpored" twice. First time it writes it step by step. With the "for-loop" I call evrey single object of an array (from razpored[0] to razpored[5]) and it happens what I think it should. The transformation is succesful and it is obvious that all objects are transformed in a row. But at the end, I order "document.write(razpored)", so the whole array should be written, but it isn't, the objects razpored[2] and razpored[3] are missing or are undefined. What is the reason for that. proba.html Link to comment Share on other sites More sharing options...
JamesB Posted September 17, 2014 Share Posted September 17, 2014 Elements at index 2 and 3 are a blank array. Remove this line: razpored[i]=new Array(); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now