Timeline for Push is not a function JavaScript error
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 19, 2016 at 7:51 | history | edited | Pierre de LESPINAY | CC BY-SA 3.0 |
deleted 5 characters in body
|
| Jan 10, 2013 at 12:41 | vote | accept | Community Bot | ||
| Jan 10, 2013 at 12:30 | answer | added | Rhumborl | timeline score: 5 | |
| Jan 10, 2013 at 12:24 | history | edited | user1702383 | CC BY-SA 3.0 |
added 201 characters in body
|
| Jan 10, 2013 at 12:22 | comment | added | Rhumborl |
looking again, this is all confusing, aside from the j loop incrementing i each time. I don't see the purpose of push("ID"). What should the array look like in the end?
|
|
| Jan 10, 2013 at 12:18 | answer | added | yogi | timeline score: 6 | |
| Jan 10, 2013 at 12:18 | answer | added | Moritz Roessler | timeline score: 3 | |
| Jan 10, 2013 at 12:17 | comment | added | Alex K. | myArray[i].push is attempting to add to whatever is in myArray[i], which in your case is "0" which is a string not an array and so has no .push ... But you then overwrite myArray[i] on the next line anyway ... got them the wrong way round? | |
| Jan 10, 2013 at 12:14 | history | asked | user1702383 | CC BY-SA 3.0 |