AllExperts > Active Server Pages Programming (ASP) 
Search      
Active Server Pages Programming (ASP)
Volunteer
Answers to thousands of questions
 Home · More Active Server Pages Programming (ASP) Questions · Answer Library  · Encyclopedia ·
More Active Server Pages Programming (ASP) Answers
Question Library

Ask a question about Active Server Pages Programming (ASP)
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About robert mamayev
Expertise
Main focus is classic ASP, Oracle 9i and 10g and MySQL databases

Experience
I am an expert with classicASP. I can answer any questions you might have about the ASP language, HTML, website design and development. I am not an expert in ASP.NET yet, so please don't ask me any questions specific to ASP.NET. Also, be sure to visit my IdeaJets website.

Publications
Article List

Education/Credentials
BS in Computer Science, Queens College, NYC

Awards and Honors
Oracle Database Certified Professional (9i databases)

Past/Present Clients
Pfizer, MasterCard

 
   

You are here:  Experts > Computing/Technology > Business Software > Active Server Pages Programming (ASP) > ASp/Javascript question

Active Server Pages Programming (ASP) - ASp/Javascript question


Expert: robert mamayev - 9/2/2009

Question
How do I use array in java script? Do you have an example?

Answer
Creating an array is slightly different from creating a normal variable. Because JavaScript has variables and properties associated with arrays, you have to use a special function to create a new array. This example shows how you would create a simple array, store values to it, and access these values.

<script type="text/javascript">
<!--
var myArray = new Array();

myArray[0] = "http://www.";
myArray[1] = "ideajets.";
myArray[2] = "com";

document.write(myArray[0] + myArray[1] + myArray[2]);
//-->
</script>

display:
http://www.ideajets.com

Hope this helps!!

Please read my other article here:
<a href="http://www.ideajets.com/articles.asp">Author Blog</a>

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.