<?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: Nafisa Muntaha</title>
    <description>The latest articles on DEV Community by Nafisa Muntaha (@muntaha3).</description>
    <link>https://dev.to/muntaha3</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%2F777030%2Fb9c32cd1-fd8f-48e7-af89-1d4993b0a18d.jpg</url>
      <title>DEV Community: Nafisa Muntaha</title>
      <link>https://dev.to/muntaha3</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/muntaha3"/>
    <language>en</language>
    <item>
      <title>JavaScript Array Methods</title>
      <dc:creator>Nafisa Muntaha</dc:creator>
      <pubDate>Mon, 27 Dec 2021 12:18:47 +0000</pubDate>
      <link>https://dev.to/muntaha3/javascript-array-methods-1cn6</link>
      <guid>https://dev.to/muntaha3/javascript-array-methods-1cn6</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript Array Methods
&lt;/h2&gt;

&lt;p&gt;An array is a special variable that holds more than one value, whether it is a string, number, or object inside a third bracket. If you have a list of things, you can store them inside an array. The syntax is like this:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;const array_name = [array_item1, array_item2, array_item3, array_item4];&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;const tasks = [‘Assignments’, ‘Homework’, ‘Coding’, ‘Read story books’];&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So if you have a list of tasks to finish today, you can declare an array and write all the&lt;br&gt;
tasks as it’s values. To get the length of the array, we can write&lt;br&gt;
&lt;em&gt;&lt;strong&gt;‘const length = tasks.length’;&lt;/strong&gt;&lt;/em&gt; and we’ll get the length of the array, which is 4 in the array tasks.&lt;/p&gt;

&lt;p&gt;We can access each task’s individual value. Index numbers represent the position of the task in the array. Index of arrays starts from zero, whatever the number of tasks is there in the array. So if you want to access the 2nd item from the array, you’ll write: &lt;em&gt;&lt;strong&gt;tasks[2];&lt;/strong&gt;&lt;/em&gt; And the output will be ‘Coding’, cause an array starts counting from zero, and by following that rule the 2nd item becomes ‘Coding’.&lt;/p&gt;

&lt;p&gt;We can also get the index number of a specific value. &lt;em&gt;&lt;strong&gt;tasks.indexOf(‘Coding’)&lt;/strong&gt;&lt;/em&gt; will show the index of the value ‘Coding’ and its index is 2.&lt;/p&gt;

&lt;p&gt;Adding or removing an item, or reversing the array is also possible. If you call &lt;em&gt;&lt;strong&gt;tasks.push(‘Watching movies’);&lt;/strong&gt;&lt;/em&gt; this task will be added at the end of the array, after all&lt;br&gt;
the previous tasks. And if you think, you want to add this task at the beginning of the array, you can also do it by using the ‘unshift()’ method.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;tasks.unshift(‘Watching movies’);&lt;/strong&gt;&lt;/em&gt; will add the task at the beginning of the array. Similarly to remove an item you have to use the ‘pop()’ method, which will remove the&lt;br&gt;
item placed at the end. And to remove the first item of the array ‘shift()’ method will be&lt;br&gt;
used.&lt;/p&gt;

&lt;p&gt;If you want to reverse the array, the reverse method will be used.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RIRG_9P2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb64ow403x36gnm39063.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RIRG_9P2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mb64ow403x36gnm39063.png" alt="Image description" width="719" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ‘concat()’ method is used to join two or more arrays together which returns a new array by joining all the arrays. It doesn’t change the value of those arrays, just joins&lt;br&gt;
those arrays and returns their values together by putting them into a new array. For example: if you have two arrays of summer fruits and winter fruits, then want to join both arrays together; you’ll use the concat method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J_xEQNlX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ts01kys75v4g3x31fpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J_xEQNlX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ts01kys75v4g3x31fpz.png" alt="Image description" width="716" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ‘every()’ method is used to return a boolean value. It runs a function for each element but doesn’t run the function if the elements are empty. And returns ‘true’ if the condition is true for all elements but if it is false, it returns ‘false’.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5tBPhZDO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u04seui38ht6v739zbaw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5tBPhZDO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u04seui38ht6v739zbaw.png" alt="Image description" width="624" height="220"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The slice() method is used to select a specific part of an array and returns the selected items of an array. It doesn’t change the original one. The splice() returns the removed items and changes the original array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X5Zv6cm9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40y5upgk3p4ylabutdx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X5Zv6cm9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40y5upgk3p4ylabutdx2.png" alt="Image description" width="648" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5KlXhhXp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mshv220o5rl1rs8cmd59.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5KlXhhXp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mshv220o5rl1rs8cmd59.png" alt="Image description" width="644" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The find method returns the first item that matches with the searched one, it doesn’t check the other remaining items once it gets the first matched item. The filter method returns all the matched items found in the array.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>array</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>JWT_</title>
      <dc:creator>Nafisa Muntaha</dc:creator>
      <pubDate>Thu, 23 Dec 2021 18:17:23 +0000</pubDate>
      <link>https://dev.to/muntaha3/jwt-1983</link>
      <guid>https://dev.to/muntaha3/jwt-1983</guid>
      <description>&lt;h2&gt;
  
  
  JWT
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;JWT stands for JSON Web Token. It is used to share security information between the client and server-side.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;JWT is used just for authorization. Authorization is mainly what makes sure that the user which sends a request to the server is the same person who logged in. It means it is authorized if the user has access to the system.&lt;/p&gt;

&lt;p&gt;JWT uses a web token for this authorization. It works like this- &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It executes the authentication process. Then the server creates a JSON web token, which we know stands for JWT, and creates a secret key so the server can check with that if the user is invalid based on that secret key. And then it takes the web token and sends it to the browser and it will send a request to the server with the JWT token. It verifies it so that it can check if the secret key and user information are the same as before to know it is valid or invalid. And if the user is valid, it sends the response back to the server. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>jwt</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>CRUD Operations</title>
      <dc:creator>Nafisa Muntaha</dc:creator>
      <pubDate>Thu, 23 Dec 2021 17:21:27 +0000</pubDate>
      <link>https://dev.to/muntaha3/crud-operations-2f7i</link>
      <guid>https://dev.to/muntaha3/crud-operations-2f7i</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;CRUD Operations&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CRUD stands for Create, Read, Update and Delete. They are the four basic operations that are necessary for storage application.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The capacity to create, read, update and delete items in a web application is important for the development of a website and making it interactive. For example: if we are making a blog page and someone wants to post blogs, without CRUD operations it would be a real problem. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The create allows adding items or data to the database. It will add a new row on the database table for adding that data. To create data, the HTTP Post method is used, it is used to create new data for the database. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Read&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The read allows reading from the database. It would never change the data. To read a resource HTTP Get method is used. No matter how many times you call the Get method, you’ll get the same data stored in there. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Update&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The update is used to update any data from the database. If you store the price of stocks and after a few days it has gone up, you would want to change the previous price to the current price. It means you would update the price from the previous one. The PUT method is used for updating data from the database. After updating it, the data will be changed from the database, also the updated data will be displayed on the website.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Delete&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The delete is used to delete data from the database or remove any resource from the system. For example, you stored your favorite dishes on the database. You want to remove pizza from the list(Don't think anyone would do that!), then you’ll use the delete operation. For that HTTP Delete method will be used. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>database</category>
      <category>crud</category>
      <category>webdev</category>
    </item>
    <item>
      <title>All About JSX</title>
      <dc:creator>Nafisa Muntaha</dc:creator>
      <pubDate>Thu, 23 Dec 2021 14:24:08 +0000</pubDate>
      <link>https://dev.to/muntaha3/all-about-jsx-enk</link>
      <guid>https://dev.to/muntaha3/all-about-jsx-enk</guid>
      <description>&lt;h2&gt;
  
  
  &lt;em&gt;JSX:&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;JSX stands for JavaScript XML. JSX allows to write HTML in react and makes it easier to write and add it. It lets to write any JavaScript or react expression inside { }. After the compilation, it becomes a normal JavaScript function calls. JSX properties make use of camelcase notation while naming HTML attributes. That’s why tabindex in HTML is called tabIndex in JSX. Even in event listeners, lowercase is used in HTML but camelcase is used in JSX. &lt;/p&gt;

&lt;p&gt;In HTML, there are self-closing tags but in JSX, a forward slash before the closing bracket must be included. It is a must in JSX, or else it will throw an error for elements of self-closing tags like HTML. It allows to write multiple tags inside one parent element like in HTML, but it is needed to put the parent element inside ‘( )’ in JSX. &lt;/p&gt;

&lt;p&gt;_With JSX: _&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom';

const myelement = &amp;lt;h1&amp;gt;I Love JSX!&amp;lt;/h1&amp;gt;;

ReactDOM.render(myelement, document.getElementById('root'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without JSX:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import ReactDOM from 'react-dom';

const myelement = React.createElement('h1', {}, 'I do not use JSX!');

ReactDOM.render(myelement, document.getElementById('root'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Advantages and disadvantages:
&lt;/h2&gt;

&lt;p&gt;JSX makes it easier to write and add HTML elements in react, can easily convert HTML elements into react elements, and is faster than normal JavaScript. It places them into the DOM and converts them into react elements. It makes it easier to write react applications. Most of the errors are identified while compiling them.&lt;/p&gt;

&lt;p&gt;There are disadvantages of it as well along with advantages. It gives an error if anything in HTML is not correct and if HTML elements are not properly closed JSX. In JSX, HTML codes must have one parent element of all the child elements. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>jsx</category>
      <category>html</category>
    </item>
  </channel>
</rss>
