<?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: Raisan JMR</title>
    <description>The latest articles on DEV Community by Raisan JMR (@raisan_jmr_).</description>
    <link>https://dev.to/raisan_jmr_</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%2F794341%2F6116dcff-7cac-40e9-a0cc-0b9b1c9e947d.png</url>
      <title>DEV Community: Raisan JMR</title>
      <link>https://dev.to/raisan_jmr_</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raisan_jmr_"/>
    <language>en</language>
    <item>
      <title>some() in javascript</title>
      <dc:creator>Raisan JMR</dc:creator>
      <pubDate>Fri, 17 Nov 2023 16:48:17 +0000</pubDate>
      <link>https://dev.to/raisan_jmr_/some-in-javascript-2ik6</link>
      <guid>https://dev.to/raisan_jmr_/some-in-javascript-2ik6</guid>
      <description>&lt;p&gt;what is &lt;strong&gt;&lt;code&gt;some()&lt;/code&gt;&lt;/strong&gt; method in javascript with help of 2 example&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE 1&lt;/strong&gt;&lt;br&gt;
we need to check if an array contain &lt;strong&gt;&lt;code&gt;admin&lt;/code&gt;&lt;/strong&gt; role, then only we need to give access to some resources in our application&lt;/p&gt;

&lt;p&gt;simple stupid way is to use &lt;strong&gt;&lt;code&gt;some()&lt;/code&gt;&lt;/strong&gt; method in javascript&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;EXAMPLE 2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here we have an array that has students' marks out of 20. and pass mark is 9, We need to check if all students have passed or not.if at least one student fails &lt;strong&gt;&lt;code&gt;some()&lt;/code&gt;&lt;/strong&gt; method returns &lt;strong&gt;&lt;code&gt;false&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;EXAMPLE 3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;consider we have an array of objects representing food items, and you want to check if at least one food item belong to a specific category such as 'Fruit'&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;br&gt;
❤️have a nice day❤️

</description>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>What is JavaScript String charAt() and charCodeAt()</title>
      <dc:creator>Raisan JMR</dc:creator>
      <pubDate>Tue, 08 Feb 2022 15:55:45 +0000</pubDate>
      <link>https://dev.to/raisan_jmr_/what-is-javascript-string-charat-and-charcodeat-2dm3</link>
      <guid>https://dev.to/raisan_jmr_/what-is-javascript-string-charat-and-charcodeat-2dm3</guid>
      <description>&lt;p&gt;first lets see &lt;code&gt;charAt()&lt;/code&gt; in javascript&lt;/p&gt;

&lt;p&gt;it is simple&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;charAt()&lt;/code&gt; method returns the character at a specified index in &lt;br&gt;
  a string&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The index of the first character is 0, the second 1, third 3&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The index of the last character is string length - 1&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dVgivzBM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0ywjbnlf0t7k1atuedk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dVgivzBM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m0ywjbnlf0t7k1atuedk.png" alt="charAt()" width="732" height="508"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;now lets see what is &lt;code&gt;charCodeAt()&lt;/code&gt; in javascript&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;charCodeAt()&lt;/code&gt; method returns Unicode of the the character at a &lt;br&gt;
specified index in a string.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The index of the first character is 0, the second is 1, third 3&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The index of the last character is string length - 1&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;both uppercase and lowercase characters has seperate unicode &lt;br&gt;
values&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C68GwvQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsz011t196i3baf38iem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C68GwvQj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsz011t196i3baf38iem.png" alt="charCodeAt()" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope your dots connected!!!! : )&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>what is concat() in javascript</title>
      <dc:creator>Raisan JMR</dc:creator>
      <pubDate>Sat, 05 Feb 2022 02:05:08 +0000</pubDate>
      <link>https://dev.to/raisan_jmr_/what-is-concat-in-javascript-4l0e</link>
      <guid>https://dev.to/raisan_jmr_/what-is-concat-in-javascript-4l0e</guid>
      <description>&lt;p&gt;&lt;code&gt;concat()&lt;/code&gt; is a method in used in javascript to concatinate two strings or two arrays.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;it does not change the existing string/arrays&lt;/li&gt;
&lt;li&gt;it returns a new string/array&lt;/li&gt;
&lt;li&gt;it joins two or more strings/array&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;below is an example of string concatination&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FF-Hpe-J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jdf0iu2deuewvnts12k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FF-Hpe-J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9jdf0iu2deuewvnts12k.png" alt="string concatination" width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;lets look at how we can use &lt;code&gt;concat()&lt;/code&gt; method to join two arrays&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y4YwChex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mur7u1lw3r4d7ykiugyo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y4YwChex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mur7u1lw3r4d7ykiugyo.png" alt="array concatination" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What is JSON</title>
      <dc:creator>Raisan JMR</dc:creator>
      <pubDate>Thu, 03 Feb 2022 12:35:31 +0000</pubDate>
      <link>https://dev.to/raisan_jmr_/what-is-json-494</link>
      <guid>https://dev.to/raisan_jmr_/what-is-json-494</guid>
      <description>&lt;p&gt;JSON which is popularly known as javascript object notation, it is a text format used to transfer data from server to client in plain text format.&lt;/p&gt;

&lt;p&gt;the format of json is similar to javascript objects.&lt;/p&gt;

&lt;p&gt;here is how javascript object looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CF2Gxx8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqa3rzf9w5fk9yfxpgbv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CF2Gxx8Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqa3rzf9w5fk9yfxpgbv.png" alt="code 1" width="800" height="777"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;next we are going to convert this &lt;code&gt;person&lt;/code&gt; object to &lt;code&gt;JSON&lt;/code&gt; using a method called &lt;code&gt;JSON.parse()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3qyUtU1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhody1kf4xvxvk123w7g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3qyUtU1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lhody1kf4xvxvk123w7g.png" alt="code 2" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the output looks like plain text. and that is called &lt;code&gt;JSON&lt;/code&gt; data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"firstName":"John","lastName":"Doe","age":17,"address":{"city":"abc city","street":"abc street"}}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to convert back this &lt;code&gt;JSON&lt;/code&gt; data to string we should use a method called &lt;code&gt;JSON.stringify()&lt;/code&gt; and pass person object to it&lt;/p&gt;

&lt;p&gt;there is an amazing website called &lt;a href="https://jsonlint.com/"&gt;https://jsonlint.com/&lt;/a&gt; to test our json code&lt;/p&gt;

</description>
      <category>json</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
