Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




Jquery and javascript interview questions with answers :- How can do we create a simple Array and loop through it?

var mycars = new Array();

    mycars[0] = "Saab";

    mycars[1] = "Volvo";

    mycars[2] = "BMW";

    for (i = 0; i < mycars.length; i++) {

        alert(mycars[i].toString());

    }

Helpful Website Url
http://www.questpond.com/
Share this article   |    Print    |    Article read by 4795 times
Author:
Shivprasad koirala Koirala
I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small E-learning company in India. We are very much active in making training videos , writing books and corporate trainings. Do visit my site http://www.questpond.com for .NET, C# , design pattern , WCF , Silverlight , LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server training and Interview questions and answers
Related Articles:
Related Interview Questions: No related interview question