JavaScript Arrays

Bynayakdillip

JavaScript Arrays

Before learning Javascript Array.

Why did you learn javascript?
Javascript has become an essential web technology along with HTML and CSS.You must Learn javascript if you want to get into web development with using Any Technology (.Net MVC, PHP, Java, Salesforce, Dynamic CRM)

let’s discuss something about javascript Array.

An array is a collection of same type data(means integer, string etc) values.we can store many values and retrieve values as per index. Also, you can store lists an array.

How to create arrays

Synatax:

var arrayOFLanguages=["","","",....];//var dynamic type it holds different data type like Integer,String,Char,List etc

Example:

var arrayOfRollNumbers=[1,2,3,4,5,6];//it store integer value of roll numbers
Var arrayOfNames=['Dillip','Kunal'];//It store string value of Names

For Accessing Particular Value

Var rollNumber=arrayOfRollNumbers=[0];//it display 1 
var name=arrayOfNames[1];//it display kunal(Retrive Records by index.Index always start with 0.
)

Methods in Array

Push
Pop
Length
Concat
Sort
Reverse
Delete
ToString

About the author

nayakdillip administrator

Leave a Reply