<?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: Judith Ifeoma Nwokike</title>
    <description>The latest articles on DEV Community by Judith Ifeoma Nwokike (@devifeoma).</description>
    <link>https://dev.to/devifeoma</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%2F76366%2F1865bd4e-e376-4e09-aa07-f60470dbafad.jpg</url>
      <title>DEV Community: Judith Ifeoma Nwokike</title>
      <link>https://dev.to/devifeoma</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devifeoma"/>
    <language>en</language>
    <item>
      <title>Integrating Storyblok into a VueJS project in a nutshell.</title>
      <dc:creator>Judith Ifeoma Nwokike</dc:creator>
      <pubDate>Thu, 19 May 2022 21:01:26 +0000</pubDate>
      <link>https://dev.to/devifeoma/integrating-storyblok-into-a-vuejs-project-in-a-nutshell-e1i</link>
      <guid>https://dev.to/devifeoma/integrating-storyblok-into-a-vuejs-project-in-a-nutshell-e1i</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this tutorial, we will learn how to add/connect Storyblok to our Vue Js project. Most of us will be wondering what Storyblok is all about. Hmm, do not panic I will explain. Storyblock is a headless CMS that can be used to create contents. For more details, visit the Storyblok documentation here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Basic understanding of JavaScript and VuetJs as framework&lt;/li&gt;
&lt;li&gt;Node installed in your local machine&lt;/li&gt;
&lt;li&gt;Install Vue CLI on your local machine&lt;/li&gt;
&lt;li&gt;Create an account on Storyblok&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install and setup React
&lt;/h2&gt;

&lt;p&gt;Let's setup our environment so we can get up and running with our project. &lt;br&gt;
To create a VuetJs project, follow the steps below or you can visit the VueJs documentation website here.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init vue@3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Follow the steps shown on the terminal and once the installation is done, navigate to the project folder using the command below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; cd storyblok-vue-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install npm in the project using the command below&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then run the command below to start your application&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Finally serve the VueJs development server using the port displayed on your command line on your browser.  In this case  &lt;a href="http://localhost:3000"&gt;http://localhost:3000&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6aquDAYw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647505940076_Screen%2BShot%2B2022-03-17%2Bat%2B9.31.44%2BAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6aquDAYw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647505940076_Screen%2BShot%2B2022-03-17%2Bat%2B9.31.44%2BAM.png" alt="Vue Js Welcome screen" width="880" height="522"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yoo! the Vue project is up and running&lt;/p&gt;

&lt;p&gt;Note: For the sake of this project, we are going to use Tailwind.css as for styling of our project. For more details on how to add Tailwind to our vue project, visit the Tailwind css official website here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Storyblok Space Configuration
&lt;/h2&gt;

&lt;p&gt;Since we done creating and running our VueJs app, now it’s time to create a space on Storyblok app. Remember you created an account on Storyblok at the beginning of this tutorial but if you’ve not done that, it’s not too late. Create a Storyblok space, by clicking this link.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5XlNigwM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507265973_Screen%2BShot%2B2022-03-17%2Bat%2B9.49.36%2BAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5XlNigwM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507265973_Screen%2BShot%2B2022-03-17%2Bat%2B9.49.36%2BAM.png" alt="Create Space Screen on Storyblok" width="880" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yeah 💃, we just created a sample content on the Storyblok space. Take a look below to see the Home story and then click on it to display the Storyblok visual editor. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G6mv7TBI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647089715919_Screen%2BShot%2B2022-03-12%2Bat%2B1.55.00%2BPM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G6mv7TBI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647089715919_Screen%2BShot%2B2022-03-12%2Bat%2B1.55.00%2BPM.png" alt="Default screen of the Home story Visual editor" width="880" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enabling the Visual Editor
&lt;/h2&gt;

&lt;p&gt;To view your project in Storyblok Visual Editor you need to set the default environment URL in your space (click the arrow on the top-left on the Visual editor screen to go back to your space).  Then click on Settings &amp;gt; General &amp;gt; then delete the default location, and set the new Location field to &lt;a href="http://localhost:3000/"&gt;http://localhost:3000/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uk88m58L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507601647_Screen%2BShot%2B2022-03-17%2Bat%2B9.58.16%2BAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uk88m58L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507601647_Screen%2BShot%2B2022-03-17%2Bat%2B9.58.16%2BAM.png" alt="Set the Default Environment URL" width="880" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now go back to the Home story under the Content section on the right hand pane of the screen. Open it, to see the Visual Editor, but then you won’t see your Vue app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LObT4RwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507781891_Screen%2BShot%2B2022-03-17%2Bat%2B10.01.49%2BAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LObT4RwY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647507781891_Screen%2BShot%2B2022-03-17%2Bat%2B10.01.49%2BAM.png" alt="Overriding the real path for the Home story" width="880" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting Vue to Storyblok
&lt;/h2&gt;

&lt;p&gt;Install Storyblok Vue SDK using the command below&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @storyblok/vue@next
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Initialize plugin in your main.js file by adding the block of code below and also add your access token from your Storyblok space. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { createApp } from 'vue'
import App from './App.vue'
import { StoryblokVue, apiPlugin } from '@storyblok/vue';
import './index.css'
const app = createApp(App);

app.use(StoryblokVue, {
  accessToken: 'CThcj1fTCUrhroIUvB8ykgtt',
  bridge: process.env.NODE_ENV !== "production", // optimises by excluding the bridge on production
  use: [apiPlugin],
});

mount('#app');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note: Wondering where the index.css is coming from, recall that we added Tailwind to our project.&lt;/p&gt;

&lt;p&gt;To copy your token, navigate to Settings &amp;gt; API Keys &amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JjNRNjEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647508360273_Screen%2BShot%2B2022-03-17%2Bat%2B10.10.02%2BAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JjNRNjEV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://paper-attachments.dropbox.com/s_556A210DC9E70316752A2099735919B864278291833D352053AC4D1C56889EAF_1647508360273_Screen%2BShot%2B2022-03-17%2Bat%2B10.10.02%2BAM.png" alt="Get the preview access token of your Storyblok space" width="880" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Displaying Components on the Vue App
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Create React Components
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

</description>
    </item>
    <item>
      <title>Building a simple event booking app with Vue and Flutterwave payment gateway.</title>
      <dc:creator>Judith Ifeoma Nwokike</dc:creator>
      <pubDate>Thu, 19 May 2022 20:53:22 +0000</pubDate>
      <link>https://dev.to/devifeoma/building-a-simple-event-booking-app-with-vue-and-flutterwave-payment-gateway-iih</link>
      <guid>https://dev.to/devifeoma/building-a-simple-event-booking-app-with-vue-and-flutterwave-payment-gateway-iih</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this blog post, we will learn how to use vue js to create a simple event booking application and also integrate Flutterwave as the payment gateway. In this application, a user will be able to register, log in and also reset password in case if a user forgot his password.  Vue.js is an open-source model–view–viewmodel front end JavaScript framework for building user interfaces and single-page applications. &lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node installed in your local machine&lt;/li&gt;
&lt;li&gt;Basic knowledge of JavaScript and Vue&lt;/li&gt;
&lt;li&gt;Install Vue CLI on your local machine&lt;/li&gt;
&lt;li&gt;create an account on Flutterwave&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install and setup Vue
&lt;/h2&gt;

&lt;p&gt;Let's setup our environment so we can get up and running with our event application&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`npm install -g vue-cli`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To create a new vue project we can use the command below to start our own event project &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`vue create event-booking-app`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You will be asked to select some options while creating your project. You can either go by the default setting or select the option manually. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`cd event-booking-app`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Navigate to the project directory&lt;br&gt;
Finally serve the vue js development server with&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`npm run serve`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Setting up Axios&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Vue from "vue";&lt;br&gt;
import App from "./App.vue";&lt;br&gt;
import router from "./router";&lt;br&gt;
import store from "./store";&lt;br&gt;
import "../src/assets/css/style.css";&lt;br&gt;
import axios from "axios";

&lt;p&gt;axios.defaults.baseURL = "&amp;lt;endpoint&amp;gt;";&lt;/p&gt;

&lt;p&gt;Vue.use(require("vue-moment"));&lt;br&gt;
Vue.config.productionTip = false;&lt;/p&gt;

&lt;p&gt;new Vue({&lt;br&gt;
  router,&lt;br&gt;
  store,&lt;br&gt;
  render: (h) =&amp;gt; h(App),&lt;br&gt;
}).$mount("#app");&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Fetching events from the API&lt;br&gt;
&lt;/h2&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;&lt;br&gt;
export default {&lt;br&gt;
  name: "index",&lt;br&gt;
  data() {&lt;br&gt;
    return {&lt;br&gt;
      events: [],&lt;br&gt;
    };&lt;br&gt;
  },&lt;br&gt;
  mounted() {&lt;br&gt;
    this.fetchEvents();&lt;br&gt;
  },&lt;br&gt;
  methods: {&lt;br&gt;
    fetchEvents() {&lt;br&gt;
      axios&lt;br&gt;
        .get(&lt;br&gt;
          "&lt;a href="https://app.ticketmaster.com/discovery/v2/events?apikey=j3NtHIoBfApjHU0wjFnjENfU3VNu9K3i&amp;amp;keyword=Tech&amp;amp;locale=en&amp;amp;size=50&amp;amp;countryCode=US"&gt;https://app.ticketmaster.com/discovery/v2/events?apikey=j3NtHIoBfApjHU0wjFnjENfU3VNu9K3i&amp;amp;amp;keyword=Tech&amp;amp;amp;locale=en&amp;amp;amp;size=50&amp;amp;amp;countryCode=US&lt;/a&gt;"&lt;br&gt;
        )&lt;br&gt;
        .then((res) =&amp;gt; {&lt;br&gt;
          this.events = res.data._embedded.events;&lt;br&gt;
          console.log(res.data._embedded);&lt;br&gt;
        })&lt;br&gt;
        .catch((error) =&amp;gt; {&lt;br&gt;
          console.log(error);&lt;br&gt;
        });&lt;br&gt;
    },&lt;br&gt;
&amp;lt;/script&amp;gt;&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Implementing search&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;In our project, we have been able to fetch events from the API but we need to search through the events for easy accessibility. Create a computed property and include the code snippet below&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  computed: {&lt;br&gt;
    resultQuery() {&lt;br&gt;
      // console.log(this.searchEvent);&lt;br&gt;
      if (this.searchEvent) {&lt;br&gt;
        const filtered = this.events.filter((item) =&amp;gt;&lt;br&gt;
          item.name.toLowerCase().includes(this.searchEvent)&lt;br&gt;
        );&lt;br&gt;
        return filtered;&lt;br&gt;
      } else {&lt;br&gt;
        return this.events;&lt;br&gt;
      }&lt;br&gt;
    },&lt;br&gt;
  },&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Authentication&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Adding authentication will enable users to sign up and login into the event booking application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sign In Component
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;&lt;br&gt;
  &amp;lt;div class="login_&lt;em&gt;container"&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Email address&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input type="email" placeholder="&lt;a href="mailto:user@email.com"&gt;user@email.com&lt;/a&gt;" v-model="user.email" /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Password&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input&lt;br&gt;
        type="password"&lt;br&gt;
        placeholder="Enter Password"&lt;br&gt;
        v-model="user.password"&lt;br&gt;
      /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;p class="forgot&lt;/em&gt;&lt;em&gt;password"&amp;gt;Forgot your password?&amp;lt;/p&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;button class="login&lt;/em&gt;&lt;em&gt;button" @click="signin()"&amp;gt;Login&amp;lt;/button&amp;gt;&lt;br&gt;
      &amp;lt;div class="login&lt;/em&gt;_alternative"&amp;gt;&lt;br&gt;
        &amp;lt;p&amp;gt;Don't have an account? &amp;lt;span &amp;gt;Sign Up&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;
      &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
  &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/template&amp;gt;

&lt;p&gt;export default {&lt;br&gt;
  data() {&lt;br&gt;
    return {&lt;br&gt;
      user: {&lt;br&gt;
        email: "",&lt;br&gt;
        password: "",&lt;br&gt;
      },&lt;br&gt;
    };&lt;br&gt;
  },&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;methods: {&lt;br&gt;
    signin() {&lt;br&gt;
      this.$store&lt;br&gt;
        .dispatch(&lt;code&gt;signin&lt;/code&gt;, {&lt;br&gt;
          email: this.user.email,&lt;br&gt;
          password: this.user.password,&lt;br&gt;
        })&lt;br&gt;
        .then(() =&amp;gt; {&lt;br&gt;
          this.$router.push({ name: "index" });&lt;br&gt;
        })&lt;br&gt;
        .catch((error) =&amp;gt; {&lt;br&gt;
          console.log(error.response.data.error);&lt;br&gt;
          // this.error = error.response.data;&lt;br&gt;
        });&lt;br&gt;
    },&lt;br&gt;
  },&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Sign Up Component&lt;br&gt;
&lt;/h2&gt;
&lt;br&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;&lt;br&gt;
  &amp;lt;div class="signup_&lt;em&gt;container"&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;First name&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input type="email" placeholder="first name" v-model="user.f_name" /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Last name&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input type="email" placeholder="last name" v-model="user.l_name" /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Email address&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input type="email" placeholder="&lt;a href="mailto:user@email.com"&gt;user@email.com&lt;/a&gt;" v-model="user.email" /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Phone number&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input&lt;br&gt;
        type="tel"&lt;br&gt;
        placeholder="(xxx)-(xxx)-(xxx)-(xxx)"&lt;br&gt;
        v-model="user.phone"&lt;br&gt;
      /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Country&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input type="number" placeholder="Nigeria" v-model="user.country" /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;label&amp;gt;Password&amp;lt;/label&amp;gt;&lt;br&gt;
      &amp;lt;input&lt;br&gt;
        type="password"&lt;br&gt;
        placeholder="Enter Password"&lt;br&gt;
        v-model="user.password"&lt;br&gt;
      /&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;div class="input&lt;/em&gt;&lt;em&gt;form&lt;/em&gt;&lt;em&gt;row"&amp;gt;&lt;br&gt;
      &amp;lt;button class="signup&lt;/em&gt;&lt;em&gt;button" @click.prevent="signup()"&amp;gt;&lt;br&gt;
        Create Account&lt;br&gt;
      &amp;lt;/button&amp;gt;&lt;br&gt;
      &amp;lt;div class="login&lt;/em&gt;_alternative"&amp;gt;&lt;br&gt;
        &amp;lt;p&amp;gt;&lt;br&gt;
          Don't have an account?&lt;br&gt;
          &amp;lt;span @click="$router.push('/login')"&amp;gt;Login&amp;lt;/span&amp;gt;&lt;br&gt;
        &amp;lt;/p&amp;gt;&lt;br&gt;
      &amp;lt;/div&amp;gt;&lt;br&gt;
    &amp;lt;/div&amp;gt;&lt;br&gt;
  &amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/template&amp;gt;

&lt;p&gt;export default {&lt;br&gt;
  data() {&lt;br&gt;
    return {&lt;br&gt;
      user: {&lt;br&gt;
        f_name: null,&lt;br&gt;
        l_name: null,&lt;br&gt;
        email: null,&lt;br&gt;
        phone: null,&lt;br&gt;
        country: null,&lt;br&gt;
        password: null,&lt;br&gt;
      },&lt;br&gt;
    };&lt;br&gt;
  },&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;methods: {&lt;br&gt;
    signup() {&lt;br&gt;
      this.$store&lt;br&gt;
        .dispatch(&lt;code&gt;signup&lt;/code&gt;, {&lt;br&gt;
          f_name: this.user.f_name,&lt;br&gt;
          l_name: this.user.l_name,&lt;br&gt;
          email: this.user.email,&lt;br&gt;
          phone: this.user.phone,&lt;br&gt;
          country: this.user.country,&lt;br&gt;
          password: this.user.password,&lt;br&gt;
        })&lt;br&gt;
        .then(() =&amp;gt; {&lt;br&gt;
          this.$router.push({ name: "login" });&lt;br&gt;
        });&lt;br&gt;
    },&lt;br&gt;
  },&lt;br&gt;
&lt;/p&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Implementing Vuex&lt;br&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We have been able to create a simple event booking application with help of vue and Flutterwave &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reasons why you should start using headless CMS</title>
      <dc:creator>Judith Ifeoma Nwokike</dc:creator>
      <pubDate>Thu, 19 May 2022 20:48:48 +0000</pubDate>
      <link>https://dev.to/devifeoma/reasons-why-you-should-start-using-headless-cms-9le</link>
      <guid>https://dev.to/devifeoma/reasons-why-you-should-start-using-headless-cms-9le</guid>
      <description>&lt;p&gt;While new technologies comes out in order to make the world of web development easy, headless CMS has been trending and popular in the world of digital content management. In this article, I will walk you through on reasons why you should start using a headless CMS for your content management. But before we start, First, let’s start with some definition what headless CMS is all about. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is Headless CMS?
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Why Headless CMS?
&lt;/h2&gt;

&lt;p&gt;You may be wondering why are people going headless. Compared to traditional CMS, Headless CMS architecture is more suitable to fulfill modern-day business demands. Besides, some additional headless CMS benefits attract them.&lt;br&gt;
Traditional CMS used to be a standard and only option. But now, the world has reasons to choose a Headless CMS.&lt;br&gt;
A few of the significant reasons to choose Headless CMS are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To deliver a personalized user experience&lt;/li&gt;
&lt;li&gt;Operate on a multichannel distribution&lt;/li&gt;
&lt;li&gt;Deliver content to a larger audience&lt;/li&gt;
&lt;li&gt;Scale your business&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Apart from these reasons, there are many advantages of headless CMS. Let’s deep dive into each of them.&lt;/p&gt;

&lt;p&gt;Some of the headless CMS platform you would like to take a look at includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storyblok&lt;/li&gt;
&lt;li&gt;Strapi&lt;/li&gt;
&lt;li&gt;Sanity&lt;/li&gt;
&lt;li&gt;Contentful&lt;/li&gt;
&lt;li&gt;GraphCMS&lt;/li&gt;
&lt;li&gt;and many more&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Advantages of Headless CMS
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Easy Integration:&lt;/li&gt;
&lt;li&gt;Scalability: &lt;/li&gt;
&lt;li&gt;Flexibility &amp;amp; Compatibility: With headless CMS, developers has the choose of using a frontend that supports a programming language that they feel comfortable with and content can be served using API.&lt;/li&gt;
&lt;li&gt;User Friendly: &lt;/li&gt;
&lt;li&gt;Security: You don’t have to worry about all the additional security requirements that come along with a traditional CMS like Wordpress. The content made accessible via an API is often ‘read-only’ adding a much needed level of security.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Use cases for Headless CMS
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

</description>
      <category>headlesscms</category>
    </item>
    <item>
      <title>JavaScript Arrays in a Nutshell for Newbies</title>
      <dc:creator>Judith Ifeoma Nwokike</dc:creator>
      <pubDate>Wed, 14 Apr 2021 11:32:39 +0000</pubDate>
      <link>https://dev.to/devifeoma/javascript-arrays-in-a-nutshell-for-newbies-5939</link>
      <guid>https://dev.to/devifeoma/javascript-arrays-in-a-nutshell-for-newbies-5939</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U4hEKYf1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1610747210676/kL--HUxHR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U4hEKYf1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1610747210676/kL--HUxHR.png" alt="Array.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A critical aspect of solving computer science problems is expressing the data in one or more forms (data structures), making it easier to perform some operations on the data. For example, a list of numbers represented as a binary search tree can be efficiently queried to check for the presence of a number and this brings us to the meaning of Data Structure. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is Data Structure? &lt;br&gt;
According to Wikipedia, a data structure is the organization and implementation of values and information. In simple words, data structure is the way of organizing data in an efficient manner.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The thing is, most programming languages make a couple of basic data types available such as strings, numbers, booleans, dictionaries, tuples, sets, etc; from which more complex data structures can be built. For JavaScript, one of such fundamental data types is the ARRAY data type, and it is very important for beginners to understand how they can use arrays.&lt;/p&gt;

&lt;p&gt;In this post, we will look at how we can create arrays in JavaScript, and also explore in a nutshell, 12 of the most popular array methods commonly used when working with arrays. This post is meant for JavaScript newbies who desire to know about arrays.&lt;/p&gt;

&lt;p&gt;Let’s go! 💃💃💃&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an Array?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An array is simply a data structure that can hold a collection of items (elements). Each element in an array has a position assigned to it, called an index. The indexes usually start from &lt;code&gt;0&lt;/code&gt;, for the first element. Indexes are properties on an array and can be used to access corresponding elements of the array.&lt;/p&gt;

&lt;p&gt;In more specific terms, an array is a list-like object with a &lt;code&gt;length&lt;/code&gt; property and positive integer properties as indexes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating an array&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript arrays can be created in many ways but in this article, we will be focusing on just three ways of creating array:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array Literal:&lt;/strong&gt;&lt;br&gt;
    The array literal notation wraps the elements of the array (as a comma-separated list of items) in a pair of square brackets (&lt;code&gt;[]&lt;/code&gt;). Any property or method available on the &lt;code&gt;Array&lt;/code&gt; prototype can be accessed on the newly created array object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];

    console.log(fruits.length); 
    // 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Array Constructor:&lt;/strong&gt;&lt;br&gt;
    A new array object can be created by calling the &lt;code&gt;Array()&lt;/code&gt; constructor with the elements of the array as arguments. The constructor function can be called with or without the &lt;code&gt;new&lt;/code&gt; keyword — the effect is basically the same. Hence, the following is similar to the array literal from before:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = new Array('banana', 'mango', 'orange', 'apple', 'melon');

console.log(fruits.length); 
// 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Spread Operators:&lt;/strong&gt;&lt;br&gt;
An array can be created from another array using the spread operator. The spread operator is simply used to list the enumerable elements of an iterable object in array and is represented using three dots (…)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Note: Spread operator can be used to clone an iterable object or merge iterable objects into one.

const = age [30, 20, 13, 34, 56]
const = combineAge [...age, 3, 7, 10, 24]

console.log(combineAge);
// [30, 20, 13, 34, 56, 3, 7, 10, 24]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Elements of an array&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is no limitation to the kind of elements a JavaScript array can contain. JavaScript arrays are designed to be heterogeneous by nature — they can contain one or more elements of any data type. For example, the array in the code snippet below contains elements of the following types: boolean, string, function, number and object.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myArray = [true, (a, b) =&amp;gt; a + b, 'house', 18, 'jane', {fruit: 'banana'}]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Since an array can contain just any type of element, it means that it's possible for an array to contain arrays — in which case it is commonly referred to as a multidimensional array (array of arrays), as shown below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Multidimensional Array
// An array that contains arrays (array of arrays)
const names = [
  ['John', 'Lola', 'Doe','Judith'],
  ['Hillary', 'Chidi', 'Humphrey', 'Mariam'],
  ['Alex', 'Usman', 'Cynthia', 'James']
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;There are times when you want an array to be homogeneous — to contain elements of the same data type. For example, say you want to perform some arithmetic operations on each element of an array; the elements of the array will have to at least be of &lt;code&gt;number&lt;/code&gt; type for this to be successful. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Array with only strings
const countries = ['kenya', 'nigeria', 'london', 'ghana', 'senegal'];

// Array with only positive integers (numbers)
const scores = [23, 67, 78, 20, 10, 26, 36];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Unfortunately, JavaScript on its own has no way of ensuring that an array is homogeneous at run-time. It is however the responsibility of the developer to do the type checks necessary before using the array as intended.&lt;/p&gt;

&lt;p&gt;JavaScript is not strictly typed — it is impossible to specify the types of content you want an array to contain at compile-time just like you could in Java, C++ or other strictly typed languages. If you are using a typed superset of JavaScript such as TypeScript, it is possible to do this at compile time. However, the program might still be prone to failures at run time, especially if it works with data from an external source.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// TYPESCRIPT EXAMPLE: HOMOGENEOUS ARRAYS (AT COMPILE TIME)
// Array with only strings
const countries: string[] = ['kenya', 'nigeria', 'london', 'ghana', 'senegal'];

// Array with only positive integers (numbers)
const scores: Array&amp;lt;number&amp;gt; = [23, 67, 78, 20, 10, 26, 36];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Popular Array Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Array&lt;/code&gt; prototype is enriched with a lot of methods for working with arrays. These methods usually serve as the foundation for implementing even more complex operations on arrays.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;map()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method returns a new array with the results of calling the provided map function on every element of an array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const sweetFruits = fruits.map(fruit =&amp;gt; 'sweet ' +  fruit);

console.log(sweetFruits);
// ["sweet banana", "sweet mango", "sweet orange", "sweet apple", "sweet melon"]

const ages = [23, 30, 13, 18, 40];
const doubleAges = ages.map(age =&amp;gt; age * 2);

console.log(doubleAges);
// [46, 60, 26, 36, 80]    
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;forEach()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method can be used to iterate through the elements of an array, calling the provided callback function for each element. Unlike the &lt;code&gt;map()&lt;/code&gt; method, the value returned by the callback function is usually ignored, and this method does not create a new array. It is commonly used when you want to cause some side-effects based on each element of an array. &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const sweetFruit = [];

fruits.forEach(fruit =&amp;gt; {
  sweetFruit.push('sweet' + fruit);
});

// ["sweet banana", "sweet mango", "sweet orange", "sweet apple", "sweet melon"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;filter()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method returns a new array containing only the elements for which the provided filter function returned truthy value. The filter function provides logic for the test condition. Elements that don’t pass the condition specified in the filter function are discarded and not included in the new array that is returned.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const fruitsWithLongNames = fruits.filter(fruit =&amp;gt; {
return fruit.length &amp;gt; 5;
});

// ["banana", "orange"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;join()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method is used to add the elements of the array together into a single string.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];

console.log(fruits.join());
// "banana,mango,orange,apple,melon"

console.log(fruits.join(' - '));
// "banana - mango - orange - apple - melon"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;includes()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method checks whether an array includes an element among its entries, returning &lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt; as appropriate.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];

console.log(fruits.includes('mango')); // true
console.log(fruits.includes('pineapple')); // false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;reduce()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reduce method is used in an array, to sum up elements of the array to one value or Item. The summation of the elements starts from the left to the right of the array.  The reduce() method is likely to be one of the tricky or difficult array methods to understand.&lt;/p&gt;

&lt;p&gt;Note:  reduce() is one of the most powerful array methods. In fact, &lt;code&gt;.reduce()&lt;/code&gt; can be used to do what both &lt;code&gt;.map()&lt;/code&gt; and &lt;code&gt;.filter()&lt;/code&gt; can do.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [4, 5, 1, 4, 2, 3, 1];
const sumOfNumbers = numbers.reduce((sum, number) =&amp;gt; sum + number, 0);

console.log(sumOfNumbers); // 20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;indexOf()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method returns the position (index) at which a given element can be found in the array. It will return &lt;code&gt;-1&lt;/code&gt; if the element is not found in the array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];

console.log(fruits.indexOf('melon')); // 4
console.log(fruits.indexOf('pineapple')); // -1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;concat()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method is used to join two or more arrays. This method does not change the existing arrays but instead returns a new array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const foods = ['yam', 'rice', 'beans', 'potato'];

console.log(fruits.concat(foods));
// ["banana", "mango", "orange", "apple", "melon", "yam", "rice", "beans", "potato"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;push()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method adds one or more elements to the end of an array and returns the new length of the array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const fruitsCount = fruits.push('pineapple');

console.log(fruits);
// ["banana", "mango", "orange", "apple", "melon", "pineapple"]

console.log(fruitsCount);
// 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;pop()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method removes the last element from an array and returns that element. Calling &lt;code&gt;.pop()&lt;/code&gt;decreases the length of the original array.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];

console.log(fruits.pop()); // "melon"
console.log(fruits.length); // 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;slice()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method simply takes a chunk/part of an array and returns it as a new array. When using the &lt;code&gt;slice()&lt;/code&gt; method, two parameters are passed which are the &lt;code&gt;startIndex&lt;/code&gt; — representing the index to start copying from, and the &lt;code&gt;endIndex&lt;/code&gt; — representing the index before which to end the slice. &lt;/p&gt;

&lt;p&gt;Note: Calling this method without arguments has been a very useful technique for creating array clones. If called directly from the &lt;code&gt;Array.prototype&lt;/code&gt;, then it could be used to convert array-likes to arrays.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Example 1
const names = ['James', 'Bola', 'Henry', 'Abiola', 'Musa'];
const newNames = names.slice();

console.log(newNames);
// ["James", "Bola", "Henry", "Abiola", "Musa"]


// Example 2
const names = ['James', 'Bola', 'Henry', 'Abiola', 'Musa'];
const newNames = names.slice(2);

console.log(newNames);
// ["Henry", "Abiola", "Musa"]


// Example 3
const names = ['James', 'Bola', 'Henry', 'Abiola', 'Musa'];
const newNames = names.slice(1, 3);

console.log(newNames);
// ["Bola", "Henry"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;find()&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method returns the value of the first element in the array that satisfies the condition defined in the provided testing function.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const fruits = ['banana', 'mango', 'orange', 'apple', 'melon'];
const foundFruit = fruits.find(fruit =&amp;gt; fruit.length &amp;gt;= 5);

console.log(foundFruit); // "banana"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this post, we were able to learn about working with JavaScript arrays and some of the useful methods they possess. Arrays are one of the most important data types in JavaScript and every developer ought to be familiar with how to use them.&lt;/p&gt;

&lt;p&gt;Yaay! I hope you enjoyed the post. 🍷🍷&lt;/p&gt;

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