{"id":764,"date":"2021-04-22T05:15:31","date_gmt":"2021-04-22T05:15:31","guid":{"rendered":"https:\/\/bcisnotes.com\/fourthsemester\/?p=764"},"modified":"2021-04-22T05:15:31","modified_gmt":"2021-04-22T05:15:31","slug":"javascript-arrays-client-side-scripting-bcis-notes","status":"publish","type":"post","link":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/","title":{"rendered":"JavaScript Arrays || Client Side Scripting || BCIS Notes"},"content":{"rendered":"<h1 style=\"text-align: center;\">JavaScript Arrays<\/h1>\n<div class=\"page\" title=\"Page 40\">\n<div class=\"section\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>Arrays are complex variables that allow us to store more than one value or a group of values under a single variable name. JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays, thus making it possible to create more complex data structures such as an array of objects or an array of arrays.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Creating an Array<\/h2>\n<p>The simplest way to create an array in JavaScript is by enclosing a comma-separated list of values in square brackets ([]), as shown in the following syntax:<\/p>\n<p>var myArray = [element0, element1, &#8230;, elementN];<\/p>\n<p>An array can also be created using the Array() constructor as shown in the following syntax. However, for the sake of simplicity previous syntax is recommended.<\/p>\n<p>var myArray = new Array(element0, element1, &#8230;, elementN);<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8469\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-04-at-2.30.41-PM.png\" alt=\"Creating an Array in JavaScript\" width=\"672\" height=\"81\" \/><\/p>\n<h2>Accessing the Elements of an Array<\/h2>\n<div class=\"page\" title=\"Page 40\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>Array elements can be accessed by their index using the square bracket notation. An index is a number that represents an element&#8217;s position in an array.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8470\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-04-at-2.31.57-PM.png\" alt=\"Accessing the Elements of an Array\" width=\"652\" height=\"77\" \/><\/p>\n<div class=\"page\" title=\"Page 41\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Getting the Length of an Array<\/h2>\n<p>The length property returns the length of an array, which is the total number of elements contained in the array. Array length is always greater than the index of any of its element.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8471\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-04-at-2.33.11-PM.png\" alt=\"Getting the Length of an Array\" width=\"632\" height=\"52\" \/><\/p>\n<div class=\"page\" title=\"Page 41\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Looping Through Array Elements<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8473\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.48.22-PM.png\" alt=\"Looping Through Array Elements\" width=\"623\" height=\"92\" \/><\/p>\n<p>Here&#8217;s the same example is rewritten using the <strong>for-of loop<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8474\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.49.24-PM.png\" alt=\"Looping Through Array Elements\" width=\"594\" height=\"98\" \/><\/p>\n<p>You can also iterate over the array elements using <strong>for-in loop<\/strong>, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8475\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.50.14-PM.png\" alt=\"Looping Through Array Elements\" width=\"579\" height=\"95\" \/><\/p>\n<div class=\"page\" title=\"Page 42\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Adding New Elements to an Array<\/h2>\n<p>To add a new element at the end of an array, simply use the push() method, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8476\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.52.17-PM.png\" alt=\"Adding New Elements to an Array\" width=\"548\" height=\"85\" \/><\/p>\n<div class=\"page\" title=\"Page 42\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>Similarly, to add a new element at the beginning of an array use unshift() method, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8477\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.53.42-PM.png\" alt=\"Adding New Elements to an Array\" width=\"591\" height=\"89\" \/><\/p>\n<div class=\"page\" title=\"Page 42\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Removing Elements from an Array<\/h2>\n<p>To remove the last element from an array you can use the pop() method. This method returns the value that was popped out.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8478\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.55.41-PM.png\" alt=\"Removing Elements from an Array\" width=\"620\" height=\"88\" \/><\/p>\n<div class=\"page\" title=\"Page 42\">\n<p><img decoding=\"async\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWcAAAASCAYAAACHIB9LAAAAAXNSR0IArs4c6QAAAHhlWElmTU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAIdpAAQAAAABAAAATgAAAAAAA+2HAAANxgAD7YcAAA3GAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAWegAwAEAAAAAQAAABIAAAAAh0TfSgAAAAlwSFlzAAALOgAACzoBZH9XDQAAALdJREFUeAHt1MENACAMAzFg\/50LYop7uBNETpU975YjQIAAgZTASaURhgABAgS+gHH2CAQIEAgKGOdgKSIRIEDAOPsBAgQIBAWMc7AUkQgQIGCc\/QABAgSCAsY5WIpIBAgQMM5+gAABAkEB4xwsRSQCBAgYZz9AgACBoIBxDpYiEgECBIyzHyBAgEBQwDgHSxGJAAECxtkPECBAIChgnIOliESAAAHj7AcIECAQFDDOwVJEIkCAwAUhpgQgsk3UhQAAAABJRU5ErkJggg==\" alt=\"page42image9973952\" width=\"358.650000\" height=\"17.525000\" \/><\/p>\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>Similarly, you can remove the first element from an array using the shift() method. This method also returns the value that was shifted out. Here&#8217;s an example:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8479\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-12.56.54-PM.png\" alt=\"Removing Elements from an Array\" width=\"594\" height=\"85\" \/><\/p>\n<div class=\"page\" title=\"Page 43\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Adding or Removing Elements at Any Position<\/h2>\n<p>The splice() method is a very versatile array method that allows you to add or remove elements from any index, using the syntax arr.splice(startIndex, deleteCount, elem1, &#8230;, elemN).<\/p>\n<p>This method takes three parameters: the first parameter is the index at which to start splicing the array, it is required; the second parameter is the number of elements to remove (use 0 if you don&#8217;t want to remove any elements), it is optional; and the third parameter is a set of replacement elements, it is also optional.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8480\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-1.25.00-PM.png\" alt=\"Adding or Removing Elements at Any Position\" width=\"616\" height=\"212\" \/><\/p>\n<div class=\"page\" title=\"Page 43\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Sorting an Array<\/h2>\n<p>Sorting is a common task when working with arrays. It would be used, for instance, if you want to display the city or county names in alphabetical order.<\/p>\n<div class=\"page\" title=\"Page 44\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>The JavaScript Array object has a built-in method sort() for sorting array elements in alphabetical order.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8481\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-1.26.22-PM.png\" alt=\"Sorting an Array\" width=\"615\" height=\"83\" \/><\/p>\n<div class=\"page\" title=\"Page 44\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Reversing an Array<\/h2>\n<p>You can use the reverse() method to reverse the order of the elements of an array.<\/p>\n<p>This method reverses an array in such a way that the first array element becomes the last, and the last array element becomes the first.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8482\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-1.27.27-PM.png\" alt=\"Reversing an Array\" width=\"598\" height=\"80\" \/><\/p>\n<div class=\"page\" title=\"Page 44\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<h2>Sorting Numeric Arrays<\/h2>\n<p>The sort() method may produce unexpected results when it is applied to the numeric arrays (i.e. arrays containing numeric values). For instance:<\/p>\n<div class=\"page\" title=\"Page 44\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8483\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-1.34.00-PM.png\" alt=\"Sorting Numeric Arrays\" width=\"586\" height=\"85\" \/><\/p>\n<div class=\"page\" title=\"Page 45\">\n<div class=\"layoutArea\">\n<div class=\"column\">\n<p>To fix this sorting problem with a numeric array, you can pass a compare function, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8484\" src=\"https:\/\/www.onlinenotesnepal.com\/wp-content\/uploads\/2021\/04\/Screen-Shot-2021-04-05-at-1.35.35-PM.png\" alt=\"Sorting Numeric Arrays\" width=\"568\" height=\"108\" \/><\/p>\n<p>If you liked our content\u00a0JavaScript Arrays, then you may also like\u00a0<a href=\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-conditional-statements-bcis-notes\/\">JavaScript Conditional Statements<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>JavaScript Arrays Arrays are complex variables that allow us to store more than one value or a group of values under a single variable name. <a class=\"mh-excerpt-more\" href=\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\" title=\"JavaScript Arrays || Client Side Scripting || BCIS Notes\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":3,"featured_media":767,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[226,245],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JavaScript Arrays || Client Side Scripting || BCIS Notes<\/title>\n<meta name=\"description\" content=\"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Arrays || Client Side Scripting || BCIS Notes\" \/>\n<meta property=\"og:description\" content=\"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\" \/>\n<meta property=\"og:site_name\" content=\"BCIS Fourth Semester\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-22T05:15:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png\" \/>\n\t<meta property=\"og:image:width\" content=\"340\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Her Highness\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Her Highness\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\"},\"author\":{\"name\":\"Her Highness\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/fcc10e27b06f3f95367e914911b47eb3\"},\"headline\":\"JavaScript Arrays || Client Side Scripting || BCIS Notes\",\"datePublished\":\"2021-04-22T05:15:31+00:00\",\"dateModified\":\"2021-04-22T05:15:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\"},\"wordCount\":576,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png\",\"keywords\":[\"JavaScript\",\"JavaScript Arrays\"],\"articleSection\":[\"IT\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\",\"name\":\"JavaScript Arrays || Client Side Scripting || BCIS Notes\",\"isPartOf\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png\",\"datePublished\":\"2021-04-22T05:15:31+00:00\",\"dateModified\":\"2021-04-22T05:15:31+00:00\",\"description\":\"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.\",\"breadcrumb\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png\",\"contentUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png\",\"width\":340,\"height\":230,\"caption\":\"JavaScript Arrays || Client Side Scripting || BCIS Notes\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bcisnotes.com\/fourthsemester\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript Arrays || Client Side Scripting || BCIS Notes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#website\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/\",\"name\":\"BCIS Fourth Semester\",\"description\":\"Notes of Information and Technology\",\"publisher\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bcisnotes.com\/fourthsemester\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#organization\",\"name\":\"BCIS Fourth Semester\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg\",\"contentUrl\":\"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg\",\"width\":300,\"height\":100,\"caption\":\"BCIS Fourth Semester\"},\"image\":{\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/fcc10e27b06f3f95367e914911b47eb3\",\"name\":\"Her Highness\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9f5c6e84ebb073447dba2985b41b0fdc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9f5c6e84ebb073447dba2985b41b0fdc?s=96&d=mm&r=g\",\"caption\":\"Her Highness\"},\"sameAs\":[\"http:\/\/bcisnotes.com\/fourthsemester\"],\"url\":\"https:\/\/bcisnotes.com\/fourthsemester\/author\/jaya\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Arrays || Client Side Scripting || BCIS Notes","description":"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.","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:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Arrays || Client Side Scripting || BCIS Notes","og_description":"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.","og_url":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/","og_site_name":"BCIS Fourth Semester","article_published_time":"2021-04-22T05:15:31+00:00","og_image":[{"width":340,"height":230,"url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png","type":"image\/png"}],"author":"Her Highness","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Her Highness","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#article","isPartOf":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/"},"author":{"name":"Her Highness","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/fcc10e27b06f3f95367e914911b47eb3"},"headline":"JavaScript Arrays || Client Side Scripting || BCIS Notes","datePublished":"2021-04-22T05:15:31+00:00","dateModified":"2021-04-22T05:15:31+00:00","mainEntityOfPage":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/"},"wordCount":576,"commentCount":0,"publisher":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage"},"thumbnailUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png","keywords":["JavaScript","JavaScript Arrays"],"articleSection":["IT"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/","url":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/","name":"JavaScript Arrays || Client Side Scripting || BCIS Notes","isPartOf":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage"},"thumbnailUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png","datePublished":"2021-04-22T05:15:31+00:00","dateModified":"2021-04-22T05:15:31+00:00","description":"JavaScript arrays can store any valid value, including strings, numbers, objects, functions, and even other arrays.","breadcrumb":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#primaryimage","url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png","contentUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/04\/bcis-17.png","width":340,"height":230,"caption":"JavaScript Arrays || Client Side Scripting || BCIS Notes"},{"@type":"BreadcrumbList","@id":"https:\/\/bcisnotes.com\/fourthsemester\/javascript-arrays-client-side-scripting-bcis-notes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bcisnotes.com\/fourthsemester\/"},{"@type":"ListItem","position":2,"name":"JavaScript Arrays || Client Side Scripting || BCIS Notes"}]},{"@type":"WebSite","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#website","url":"https:\/\/bcisnotes.com\/fourthsemester\/","name":"BCIS Fourth Semester","description":"Notes of Information and Technology","publisher":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bcisnotes.com\/fourthsemester\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#organization","name":"BCIS Fourth Semester","url":"https:\/\/bcisnotes.com\/fourthsemester\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/","url":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg","contentUrl":"https:\/\/bcisnotes.com\/fourthsemester\/wp-content\/uploads\/2021\/02\/cropped-4-1.jpg","width":300,"height":100,"caption":"BCIS Fourth Semester"},"image":{"@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/fcc10e27b06f3f95367e914911b47eb3","name":"Her Highness","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bcisnotes.com\/fourthsemester\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9f5c6e84ebb073447dba2985b41b0fdc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9f5c6e84ebb073447dba2985b41b0fdc?s=96&d=mm&r=g","caption":"Her Highness"},"sameAs":["http:\/\/bcisnotes.com\/fourthsemester"],"url":"https:\/\/bcisnotes.com\/fourthsemester\/author\/jaya\/"}]}},"_links":{"self":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/764"}],"collection":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/comments?post=764"}],"version-history":[{"count":1,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/764\/revisions"}],"predecessor-version":[{"id":768,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/posts\/764\/revisions\/768"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/media\/767"}],"wp:attachment":[{"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/media?parent=764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/categories?post=764"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bcisnotes.com\/fourthsemester\/wp-json\/wp\/v2\/tags?post=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}