<?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: Ahmad</title>
    <description>The latest articles on DEV Community by Ahmad (@ahmad_9611bc9dded86508a10).</description>
    <link>https://dev.to/ahmad_9611bc9dded86508a10</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%2F3458907%2F303d7cda-6b90-44be-98da-cd29e6a72653.png</url>
      <title>DEV Community: Ahmad</title>
      <link>https://dev.to/ahmad_9611bc9dded86508a10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmad_9611bc9dded86508a10"/>
    <language>en</language>
    <item>
      <title>Guide to MongoDb</title>
      <dc:creator>Ahmad</dc:creator>
      <pubDate>Mon, 09 Mar 2026 19:45:59 +0000</pubDate>
      <link>https://dev.to/ahmad_9611bc9dded86508a10/guide-to-mongodb-2m5i</link>
      <guid>https://dev.to/ahmad_9611bc9dded86508a10/guide-to-mongodb-2m5i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction -
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Brief database description -&lt;/strong&gt;&lt;br&gt;
A database is a structured, organised, collection of data used for storage, retrieval, management, and manipulation of data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL -&lt;/strong&gt;&lt;br&gt;
Traditionally this is done with what is called an SQL (Structured Query Language). This language allows users to communicate with relational databases such as MySQL, Postgres, SQLite, etc. A relational database is a database that organises data into rows and columns, creating relationships between datapoints.&lt;/p&gt;

&lt;p&gt;SQL databases are the right choice for many applications, but they can take time to prepare, and though they are easy to scale onto bigger servers, they are challenging to scale across multiple servers due to them being “rigid”, maintaining strong data consistency, and managing complex join operations.&lt;/p&gt;
&lt;h2&gt;
  
  
  Enter MongoDB -
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is MongoDB? -&lt;/strong&gt;&lt;br&gt;
A good alternative to SQL databases is MongoDB, an open-source, document oriented, NoSQL database. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why use it? -&lt;/strong&gt; &lt;br&gt;
NoSQL means that relational tables aren’t used, and instead other formats such as key-value pairs, graphs, and documents are used. These formats are much more flexible and can easily store a wide variety of data, and due to them being non-relational NoSQL databases can be significantly faster and easier to design, update, and scale (vertically and horizontally).&lt;/p&gt;
&lt;h2&gt;
  
  
  Making a MongoDB database -
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Installation options -&lt;/strong&gt;&lt;br&gt;
MongoDB can be either locally installed or set up in the cloud through MongoDB Atlas.&lt;br&gt;
Why MongoDB Atlas is preferred -&lt;br&gt;
Installing locally means one would have to maintain and upkeep the system, but MongoDB Atlas is a fully managed database-as-a-server where database clusters, a group of interconnected servers, can be created using AWS, Azure, or Google Cloud.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to use your database -
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Creating a cluster -&lt;/strong&gt;&lt;br&gt;
Sign up. To access MongoDB Atlas, go to &lt;a href="https://www.mongodb.com/cloud/atlas/register" rel="noopener noreferrer"&gt;https://www.mongodb.com/cloud/atlas/register&lt;/a&gt; and you will be prompted to sign up. &lt;br&gt;
Create a database cluster. You will have the ability to choose a subscription plan, a provider, a region, and tags for categorization.&lt;br&gt;
Connect to your cluster. The steps to doing this include setting up a connection security, choosing a connect method, and finally connecting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Receiving and displaying data -&lt;/strong&gt;&lt;br&gt;
This code should be placed in a js file to import and connect to your database.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MongoClient&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ServerApiVersion&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mongodb&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uri&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mongodb+srv://aford504:Nitro0311$@mvpcluster.zrfg2f2.mongodb.net/?appName=MVPCluster&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;span class="c1"&gt;// Create a MongoClient with a MongoClientOptions object to set the Stable API version&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;MongoClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;uri&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="na"&gt;serverApi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ServerApiVersion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;v1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;strict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;deprecationErrors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;


&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c1"&gt;// Connect the client to the server (optional starting in v4.7)&lt;/span&gt;
   &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
   &lt;span class="c1"&gt;// Send a ping to confirm a successful connection&lt;/span&gt;
   &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sample_mflix&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;command&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;ping&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Pinged your deployment. You successfully connected to MongoDB!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="c1"&gt;// Runs function to display data&lt;/span&gt;
   &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;findListings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;finally&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c1"&gt;// Ensures that the client will close when you finish/error&lt;/span&gt;
   &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code receives data from the database sample_mflix’s users collection and prints it to the console.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;findListings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resultsLimit&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cursor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;db&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sample_mflix&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;users&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
   &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resultsLimit&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toArray&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
 &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Found &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; listing(s):`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nx"&gt;date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last_review&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toDateString&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;


     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;. name: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   _id: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   bedrooms: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bedrooms&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`   bathrooms: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bathrooms&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
     &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
       &lt;span class="s2"&gt;`   most recent review date: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
         &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;last_review&lt;/span&gt;
       &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toDateString&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
     &lt;span class="p"&gt;);&lt;/span&gt;
   &lt;span class="p"&gt;});&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If sample_mflix isn’t in your cluster, then you can click the Load Sample Dataset button to create it.&lt;/p&gt;

&lt;p&gt;Assuming you named the file mongo.js, you can now run “node mongo.js” in the terminal to see the five listings of users.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>database</category>
      <category>mongodb</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Guide to Figma</title>
      <dc:creator>Ahmad</dc:creator>
      <pubDate>Tue, 20 Jan 2026 23:39:07 +0000</pubDate>
      <link>https://dev.to/ahmad_9611bc9dded86508a10/guide-to-figma-3lbg</link>
      <guid>https://dev.to/ahmad_9611bc9dded86508a10/guide-to-figma-3lbg</guid>
      <description>&lt;h2&gt;
  
  
  What is Figma? -
&lt;/h2&gt;

&lt;p&gt;Figma is a beginner-friendly design tool used to create, prototype, and collaborate on interface designs. Figma can be used when developing apps or websites. Major companies such as Microsoft, Google,  and Netflix use Figma to design their UIs.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqe7p2bwdszjgxr7378y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqe7p2bwdszjgxr7378y.png" alt=" " width="300" height="168"&gt;&lt;/a&gt;&lt;br&gt;
After entering your preferred name, you will then answer questions to describe yourself, optionally invite others to collaborate with you, and choose a plan, with the starter plan being free. Next, you can begin working on projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get started -
&lt;/h2&gt;

&lt;p&gt;To get started using Figma, go to their site, click “Get Started,” and sign up using your email.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3ee9uyainub55ttq3r4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3ee9uyainub55ttq3r4.png" alt=" " width="509" height="250"&gt;&lt;/a&gt;&lt;br&gt;
After entering your preferred name, you will then answer questions to describe yourself, optionally invite others to collaborate with you, and choose a plan, with the starter plan being free. Next, you can begin working on projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting projects -
&lt;/h2&gt;

&lt;p&gt;A file is where designing takes place, and projects are what group related files to be managed by you and others. Projects are similar to Github project boards, while files are like repositories, within those files, you may create different pages for your potential homepages or menus. Files can be created by many means. To make a file within a project, go to the “All projects” section on the left, then press the blue plus icon in a slot of an existing project to add a file to it.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb0dtsu09zhmwsmszm41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb0dtsu09zhmwsmszm41.png" alt=" " width="509" height="250"&gt;&lt;/a&gt;&lt;br&gt;
You can also create a file without a project by hovering over the “Drafts” section on the left and pressing the plus icon that appears to the right of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools -
&lt;/h2&gt;

&lt;p&gt;There are an extensive number of tools to be used on Figma, but here you will find the key features.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtnxpxt3v9jqci8cuok2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxtnxpxt3v9jqci8cuok2.png" alt=" " width="509" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the center, you will find the canvas. This is the main area where you will create and view your designs. &lt;/li&gt;
&lt;li&gt;To the left is the file, which contains the layers panel. This is where you can manage and arrange your frames, shapes, and other items. &lt;/li&gt;
&lt;li&gt;To the right is the properties panel. This is where you can change the details of your items. &lt;/li&gt;
&lt;li&gt;Finally, at the bottom is the toolbar, where you will find essential functions to making designs, such as frames, shapes, pen, and text.
An important practice while using these tools is to name everything, all the way from your projects to your smallest items, to differentiate and organise them. Another is to use components, which store multiple items in a group, and treat them as a single item. To use them, right click on an item and press the “Create component” option. You can then drag other items into the component so they can act as one item.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffnf7ghnxc9g1rrq35joj.png" alt=" " width="510" height="254"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to use projects with code -
&lt;/h2&gt;

&lt;p&gt;There isn’t a native way of linking Figma designs to code, though there are other ways to do so. One way to use your designs is through extensions. In the toolbar, press the button labeled “Actions”, then go to the “Plugins &amp;amp; widgets” section. There, you can search for extensions that can translate your designs into code. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00mmfqpwhpl7wsd13t90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00mmfqpwhpl7wsd13t90.png" alt=" " width="161" height="143"&gt;&lt;/a&gt;&lt;br&gt;
Using TeleportHQ, you can select the parts of your design you want to be used as code and export them as a new project. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs18a2gm70wyaea5j6roo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs18a2gm70wyaea5j6roo.png" alt=" " width="508" height="252"&gt;&lt;/a&gt;&lt;br&gt;
Know that many extensions that turn designs into code don’t get everything perfectly, after converting your project to code, you may have to adjust items to look how they did before. Within the new project, press the “Code” button in the top right to view the project in React, HTML, Next, and other languages. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcn0ey0ushzxc98epb99p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcn0ey0ushzxc98epb99p.png" alt=" " width="508" height="251"&gt;&lt;/a&gt;&lt;br&gt;
Finally, you can copy the code into a repository to be used in creating a website.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnvvvbfo1ac955cxkuad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgnvvvbfo1ac955cxkuad.png" alt=" " width="508" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>design</category>
      <category>github</category>
    </item>
    <item>
      <title>Set Data Structure</title>
      <dc:creator>Ahmad</dc:creator>
      <pubDate>Thu, 06 Nov 2025 21:13:27 +0000</pubDate>
      <link>https://dev.to/ahmad_9611bc9dded86508a10/set-data-structure-41ed</link>
      <guid>https://dev.to/ahmad_9611bc9dded86508a10/set-data-structure-41ed</guid>
      <description>&lt;p&gt;When storing data, the way in which you go about it is essential. In some cases, you may want to dump data into a storage to retrieve it later, while in others, you may want to set off data into different categories. In this blog, you will be introduced to the set data structure and its significance.&lt;/p&gt;

&lt;h1&gt;
  
  
  Data Structures -
&lt;/h1&gt;

&lt;p&gt;Before understanding sets, we must learn about data structures.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data structures are a means of storing, sorting, and handling data.&lt;/li&gt;
&lt;li&gt;They allow you to efficiently manage data in ways suited for most tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Sets -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Sets are data structures that store unique, unordered values. &lt;/li&gt;
&lt;li&gt;Sets are good for comparison and checking membership, rather than retrieval and modification, as they don’t have a direct means of returning single values.&lt;/li&gt;
&lt;li&gt;How to use sets in JavaScript:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;hi&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// {1, ‘hi’, 0}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Implementation -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Most sets are implemented through hash tables, which on average have an O(1) time complexity for insertions, deletions, and checks.&lt;/li&gt;
&lt;li&gt;Some sets are implemented through binary search trees, which on average have an O(log n) time complexity for the same functions.&lt;/li&gt;
&lt;li&gt;JavaScript uses hash tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Unique -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Uniqueness is one of the main appeals of sets.
If a duplicate value is passed into a set, the set will not accept the value.&lt;/li&gt;
&lt;li&gt;However, in JavaScript, a set can contain identical objects and arrays, as long as they have different references.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([{&lt;/span&gt;&lt;span class="na"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;hi&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;}]);&lt;/span&gt; &lt;span class="c1"&gt;// {{greeting: ‘hi’}}&lt;/span&gt;
&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;hi&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt; &lt;span class="c1"&gt;// {{greeting: ‘hi’}, {greeting: ‘hi’}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Unordered -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Generally, sets don’t maintain any specific order.&lt;/li&gt;
&lt;li&gt;There aren’t any keys or indices representing values.&lt;/li&gt;
&lt;li&gt;The value itself is what identifies it.
Though in JavaScript, sets maintain input order.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Basic Methods -
&lt;/h1&gt;

&lt;p&gt;Here are some basic methods associated with sets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set.add(value) - adds values&lt;/li&gt;
&lt;li&gt;set.delete(value) - removes value&lt;/li&gt;
&lt;li&gt;set.has(value) - returns if a value exists&lt;/li&gt;
&lt;li&gt;set.size() - returns the size of the set&lt;/li&gt;
&lt;li&gt;set.clear() - removes all values from the set&lt;/li&gt;
&lt;li&gt;set.values() - returns the values of the set&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Iteration -
&lt;/h1&gt;

&lt;p&gt;Due to the nature of sets, iteration isn’t the most useful, but here are some ways to do so:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set.forEach(callback(value, key, set)) - key is the same as value&lt;/li&gt;
&lt;li&gt;for (const val of set) {}&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Other Methods -
&lt;/h1&gt;

&lt;p&gt;Here are some methods that compare two sets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;setA.union(setB) - returns a set containing elements found in either set&lt;/li&gt;
&lt;li&gt;setA.intersection(setB) - returns a set containing elements found in both sets&lt;/li&gt;
&lt;li&gt;setA.difference(setB) - returns a set containing elements not found in setB&lt;/li&gt;
&lt;li&gt;setA.symmetricDifference(setB) - returns a set containing elements not found in both sets&lt;/li&gt;
&lt;li&gt;setA.isSubsetOf(setB) - returns if setA’s elements are found in setB&lt;/li&gt;
&lt;li&gt;setA.isSupersetOf(setB) - returns if setB’s elements are found in setA&lt;/li&gt;
&lt;li&gt;setA.isDisjointFrom(setB) - returns if the sets share no elements&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Sets to and from arrays -
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="kd"&gt;set&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;‘&lt;/span&gt;&lt;span class="nx"&gt;hi&lt;/span&gt;&lt;span class="err"&gt;’&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// {1, ‘hi’, 0}&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt; &lt;span class="c1"&gt;// [1, ‘hi’, 0]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Applications -
&lt;/h1&gt;

&lt;p&gt;Sets may be preferable to other data structures when trying to…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store unique elements.&lt;/li&gt;
&lt;li&gt;Check for membership of elements.&lt;/li&gt;
&lt;li&gt;Compare and store differences/similarities of data.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this information on the set data structure, you now have one more way of managing data at your disposal. Though sets are only one tool out of many, they can be the perfect solution to your data storage problems.&lt;/p&gt;

</description>
      <category>datastructures</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Three useful Javascript array methods</title>
      <dc:creator>Ahmad</dc:creator>
      <pubDate>Thu, 04 Sep 2025 21:31:58 +0000</pubDate>
      <link>https://dev.to/ahmad_9611bc9dded86508a10/three-useful-javascript-array-methods-1lo4</link>
      <guid>https://dev.to/ahmad_9611bc9dded86508a10/three-useful-javascript-array-methods-1lo4</guid>
      <description>&lt;p&gt;When working with arrays, repeatedly creating functions to access and modify them can become tedious. The following array methods streamline your workflow and make your code cleaner.&lt;/p&gt;

&lt;h1&gt;
  
  
  Array.findIndex(function) -
&lt;/h1&gt;

&lt;p&gt;The .findIndex() method iterates through an array, calling the given function for each element. If the function returns true for any element, it returns that element’s index; otherwise, it returns -1. Here’s an example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Here's&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;an&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findIndex&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;element&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;element&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Returns 2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Technicalities -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;The callback function uses the current element, its index, and the array as arguments.&lt;/li&gt;
&lt;li&gt;A downside to this method is that it will only return the first value that returns true.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Uses -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Verifying that certain values exist in an array.&lt;/li&gt;
&lt;li&gt;Finding and altering certain values in an array
Searching arrays for values that meet different criteria.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Array.splice(start, deleteCount, item1) -
&lt;/h1&gt;

&lt;p&gt;The .splice() method extends the functionality of .push() and .pop(). This method inserts items into an array after the start argument and deletes a specified number of elements, starting with the start index. Here’s an example.&lt;br&gt;
​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Here's&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;an&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="err"&gt;​&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;splice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;my&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;grand&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Returns ["Here's", "my", "grand", "example!"]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Technicalities -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;The method can take an infinite number of items.&lt;/li&gt;
&lt;li&gt;deleteCount can be 0.&lt;/li&gt;
&lt;li&gt;Items aren't required.&lt;/li&gt;
&lt;li&gt;The method alters the original array.&lt;/li&gt;
&lt;li&gt;It returns an array containing the deleted values.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Uses -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Replacing array elements.&lt;/li&gt;
&lt;li&gt;It can be used as a precise .push().&lt;/li&gt;
&lt;li&gt;It can be used as a precise .pop().&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Array.reduce(function, initialValue) -
&lt;/h1&gt;

&lt;p&gt;The .reduce() method calls a given function for every element in an array, using four parameters: accumulator, the value returned by the previous function call; initialValue, used for the first function call; currentValue, the current element in the array; currentIndex, the current index; and the array itself. The method returns one value, being the final result of the given function. Here’s an example.&lt;br&gt;
​&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Here's&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;an&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;example!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="err"&gt;​&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;accumulator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;currentValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;-&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;currentValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Returns "Here's-an-example!"&lt;/span&gt;
&lt;span class="err"&gt;​&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;span class="err"&gt;​&lt;/span&gt;
&lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;accumulator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;currentValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;accumulator&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;currentValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Returns -24&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Technicalities -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;If no initialValue is given, the first value of the array will be used, and the second value will become the currentValue.&lt;/li&gt;
&lt;li&gt;The original array won’t be affected.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Uses -
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Calculating numbers in an array.&lt;/li&gt;
&lt;li&gt;Comparing values in an array.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these methods, you can efficiently manage your arrays without having to jump through hoops of code.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Resources: &lt;a href="//developer.mozilla.org"&gt;developer.mozilla.org&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
​&lt;/p&gt;

&lt;p&gt;​&lt;br&gt;
​&lt;/p&gt;




</description>
    </item>
  </channel>
</rss>
