Hello!

I just started learning JavaScript and came across a miracle that I don’t understand, or I’m doing something wrong.

in general, the essence is as follows:

var myAray = ["first","second"]; var myStr; for (var i = 0; i < myAray.Length; i++) { myStr = myAray[i]; alert(myStr); } 

The result is undefined ... In C #, this works (

ps: I apologize wildly for so many stupid question!

Closed due to the fact that off-topic by user207618, dirkgntly , korytoff , Denis , aleksandr barakin Aug 31 '16 at 6:55 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - Community spirit, dirkgntly, korytoff, Denis, aleksandr barakin
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 3
    Learn carefully, in JS , arrays do not have the Length property, only length . - user207618
  • I vote for closing, and the answer has already been given above @Other - dirkgntly
  • Thank you very much! This is the way it was, the whole day I thought what was wrong with me, everything wouldn’t go away from Sharp) - Vladimir Alexandrov

0