How to access elements from Array in JavaScript?
Syntax:
array[index]; // where index starts from 0 and that no of element want to access
Ex:
array[] names=[‘Sam’,’John’,’Sachin’];
document.write(names[0]); // result: Sam as it is first element
asp.net,c#.net, MVC, WPF, WCF, JavaScript, JQuery, SQL Server, Interview Q&A
How to access elements from Array in JavaScript?
Syntax:
array[index]; // where index starts from 0 and that no of element want to access
Ex:
array[] names=[‘Sam’,’John’,’Sachin’];
document.write(names[0]); // result: Sam as it is first element