<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: VernocDatBom</title>
    <description>The latest articles on DEV Community by VernocDatBom (@vernoc_bom_afdcd3801d494d).</description>
    <link>https://dev.to/vernoc_bom_afdcd3801d494d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3592794%2F49884a87-254a-4879-9a17-28ac7604521e.png</url>
      <title>DEV Community: VernocDatBom</title>
      <link>https://dev.to/vernoc_bom_afdcd3801d494d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vernoc_bom_afdcd3801d494d"/>
    <language>en</language>
    <item>
      <title>Arrays: What you should know</title>
      <dc:creator>VernocDatBom</dc:creator>
      <pubDate>Sun, 02 Nov 2025 03:54:34 +0000</pubDate>
      <link>https://dev.to/vernoc_bom_afdcd3801d494d/arrays-what-you-should-know-fp3</link>
      <guid>https://dev.to/vernoc_bom_afdcd3801d494d/arrays-what-you-should-know-fp3</guid>
      <description>&lt;p&gt;Were you ever one of those nerdy kids who used Google Sheets to make graphs and stuff instead of creating a blocky, inaccurate mess of a bar graph in your presentation group project?&lt;/p&gt;

&lt;p&gt;Wanna do it again?&lt;/p&gt;

&lt;p&gt;Arrays are the most useful data structures in code for holding a lot of data. And I mean a LOT. It's your code, you can write 10,000 lines of pure arrays if you want to.&lt;/p&gt;

&lt;p&gt;But let's say you have never seen an array before, and have no idea what it does. What does it look like? Unlike most people would expect, arrays are actually variables. They're a special type of variable that can hold more than one value. A simple array would be something like;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;array = [0, 6, 2, 4]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Each value in the array is one variable. Because variables can hold many data types, you could write an array like;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;array2 = ["Apples", 21, emotion, "Married"]&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  But wait! There's more (Dimensions)!
&lt;/h2&gt;

&lt;p&gt;Of course, if you have more data than just a few variables, things can get messy. We thought of that.&lt;/p&gt;

&lt;p&gt;There's more to arrays than just the one dimension. Yes, the array example was a 1-Dimensional array. This means there are 2-Dimensional arrays, as well as 3, 4, 27, and so on. And no, I will not type a 27-Dimensional array for your entertainment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;array2d =
[
   [11, 12, 13, 14],
   [21, 22, 23, 24],
   [31, 32, 33, 34]
]

array3d = 
[
   [
      [111, 112, 113, 114],
      [121, 122, 123, 124],
      [131, 132, 133, 134]
   ],
   [
      [211, 212, 213, 214],
      [221, 222, 223, 224],
      [231, 232, 233, 234]
   ]
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  "But how would I ever use this?"
&lt;/h2&gt;

&lt;p&gt;You may ask. in order to pull values from an array, you have to type the value of each dimension like;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;array[2] // 6

array2d[2][3] // 32

array3d[2][3][1] // 132
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you would ever use these? Well, just like normal variables. Here are a few examples;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if array2d[1][3] = 999
{
   draw_text(32, 32, "I did something!")
}

if 12 = 12
{
   show_message(array3d[4][1][2])
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>tutorial</category>
      <category>gamemaker</category>
      <category>gml</category>
    </item>
  </channel>
</rss>
