0
Multi dimensional array is not working also don't understand how it works. Please help
4 odpowiedzi
+ 1
Why do you expect mynewArray to work ? Did you created a constructor function for it since you are created an new object for it(mynewArray) ,to declare a array you need to use the built in Array() constructor for creating array objects
I think you should go through some tutorials online and through the course in here as well to understand how to work with arrays
+ 1
Someone thanks again. 🙏🙏🙏
0
Not helpful. Please anyone there who can make me understand Someone Sneh Chauhan
0
Avinash to declare a array you should call Array instead of myNewArray.
And a typo in the last line :
document.write(myArray1[i][j + "&emsp"]);
In this line you are trying to access myArray1's i th row's j+"&emsp" th value (which always returns undefined).
You may be trying to add   char at the end of each number in the array. If so then it should be document.write(myArray1[i][j]+ " "); (also an html character code should begin with an '&' and end with ';').
Corrected code :
https://code.sololearn.com/WKMtnfg1P79Z/?ref=app