{"id":779,"date":"2013-07-16T08:12:30","date_gmt":"2013-07-16T08:12:30","guid":{"rendered":"http:\/\/javascript-tutor.net\/?p=779"},"modified":"2015-05-07T13:12:36","modified_gmt":"2015-05-07T13:12:36","slug":"creating-arrays-in-javascript","status":"publish","type":"post","link":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/","title":{"rendered":"Creating Arrays in JavaScript"},"content":{"rendered":"<p>An array\u00a0a regular data structure\u00a0comprises\u00a0individual elements\u00a0that can\u00a0be referenced\u00a0to one or more integer index variables, the number of such indices being the number of dimensions\u00a0or number of elements\u00a0in the array.In\u00a0JavaScript, an array is usually represented using the format\u00a0<strong>arrayName[ i ],<\/strong><strong>\u00a0<\/strong>where i is the index or subscript which represents the position of the element within the array<strong>.<\/strong><strong>\u00a0<\/strong>The array always starts with the zeoth element. For example, an array A that consists 1of 0 elements comprises elements\u00a0 A[0], A[1], A[2], A[3], A[4],A[5], A[6], A[7], A[8] and A[9].<\/p>\n<p><a href=\"http:\/\/javascript-tutor.net\/index.php\/lesson-22-creating-arrays-javascript-part-1\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An array\u00a0a regular data structure\u00a0comprises\u00a0individual elements\u00a0that can\u00a0be referenced\u00a0to one or more integer index variables, the number of such indices being the number of dimensions\u00a0or number of elements\u00a0in the array.In\u00a0JavaScript, an array is usually represented using the format\u00a0arrayName[ i ],\u00a0where i is the index or subscript which represents the position of the element within the array.\u00a0The &hellip; <a href=\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Creating Arrays in JavaScript&#8221;<\/span><\/a><\/p>\n","protected":false},"author":35895,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-779","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Creating Arrays in JavaScript - javascript tutorial<\/title>\n<meta name=\"description\" content=\"This articles explains how to create arrays in JavaScript\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating Arrays in JavaScript - javascript tutorial\" \/>\n<meta property=\"og:description\" content=\"This articles explains how to create arrays in JavaScript\" \/>\n<meta property=\"og:url\" content=\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn JavaScript Online | Free Interactive JavaScript Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2013-07-16T08:12:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-05-07T13:12:36+00:00\" \/>\n<meta name=\"author\" content=\"Liew Voon Kiong\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Liew Voon Kiong\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\",\"url\":\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\",\"name\":\"Creating Arrays in JavaScript - javascript tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/javascript-tutor.net\/#website\"},\"datePublished\":\"2013-07-16T08:12:30+00:00\",\"dateModified\":\"2015-05-07T13:12:36+00:00\",\"author\":{\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8\"},\"description\":\"This articles explains how to create arrays in JavaScript\",\"breadcrumb\":{\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/javascript-tutor.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating Arrays in JavaScript\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/javascript-tutor.net\/#website\",\"url\":\"https:\/\/javascript-tutor.net\/\",\"name\":\"Learn JavaScript Online | Free Interactive JavaScript Tutorials\",\"description\":\"Master JavaScript with free, interactive tutorials for beginners and experienced coders. Practice live coding and visualize how JavaScript works step by step.\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8\",\"name\":\"Liew Voon Kiong\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/javascript-tutor.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g\",\"caption\":\"Liew Voon Kiong\"},\"url\":\"https:\/\/javascript-tutor.net\/index.php\/author\/ajt7051jct\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Creating Arrays in JavaScript - javascript tutorial","description":"This articles explains how to create arrays in JavaScript","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"Creating Arrays in JavaScript - javascript tutorial","og_description":"This articles explains how to create arrays in JavaScript","og_url":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/","og_site_name":"Learn JavaScript Online | Free Interactive JavaScript Tutorials","article_published_time":"2013-07-16T08:12:30+00:00","article_modified_time":"2015-05-07T13:12:36+00:00","author":"Liew Voon Kiong","twitter_misc":{"Written by":"Liew Voon Kiong"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/","url":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/","name":"Creating Arrays in JavaScript - javascript tutorial","isPartOf":{"@id":"https:\/\/javascript-tutor.net\/#website"},"datePublished":"2013-07-16T08:12:30+00:00","dateModified":"2015-05-07T13:12:36+00:00","author":{"@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8"},"description":"This articles explains how to create arrays in JavaScript","breadcrumb":{"@id":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/javascript-tutor.net\/index.php\/2013\/07\/16\/creating-arrays-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/javascript-tutor.net\/"},{"@type":"ListItem","position":2,"name":"Creating Arrays in JavaScript"}]},{"@type":"WebSite","@id":"https:\/\/javascript-tutor.net\/#website","url":"https:\/\/javascript-tutor.net\/","name":"Learn JavaScript Online | Free Interactive JavaScript Tutorials","description":"Master JavaScript with free, interactive tutorials for beginners and experienced coders. Practice live coding and visualize how JavaScript works step by step.","inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/63d832c3efdf443517b5f5bfd1b93df8","name":"Liew Voon Kiong","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/javascript-tutor.net\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/413ad70576fa5f43c1d3ae3429c92579c21f536c350e6470302fa25ddd9b6a13?s=96&d=mm&r=g","caption":"Liew Voon Kiong"},"url":"https:\/\/javascript-tutor.net\/index.php\/author\/ajt7051jct\/"}]}},"_links":{"self":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/779","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/users\/35895"}],"replies":[{"embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/comments?post=779"}],"version-history":[{"count":1,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":780,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/posts\/779\/revisions\/780"}],"wp:attachment":[{"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/javascript-tutor.net\/index.php\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}