Welcome Guest! (App Version 3.1)

websitnero logo name

Arrays

Arrays

Arrays are a collection of data items. The data items may be string, number, boolean or anything. Array means a set or collection. The individual items can be accessed by using number positions in front of array names.

Arrays in themselves are not any new data-type. They are containers which contain a list of values which may be of same data-type or may not. Consider you want to keep a list of flowers, or vegetables, or colors or simply your friends' name, which keep their individual identity (like in string all names will be merged up) and also they are contained in a single entity or variable. The best solution is Arrays.

Example

<button onclick="alpha()"> Click </button>

<script>
var a = ['red', 'green', 'blue'];
function alpha(){
  alert(a[1]); 
}
</script>
WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.