<?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: Adnan Aslam</title>
    <description>The latest articles on DEV Community by Adnan Aslam (@adnanaslam).</description>
    <link>https://dev.to/adnanaslam</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%2F590597%2F7a43919c-dfd5-40bc-88c5-32a8008d8c4c.jpeg</url>
      <title>DEV Community: Adnan Aslam</title>
      <link>https://dev.to/adnanaslam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adnanaslam"/>
    <language>en</language>
    <item>
      <title>𝗜𝗻𝘁𝗲𝗴𝗿𝗮𝘁𝗲𝗱 𝗣𝗜𝗫𝗔𝗕𝗔𝗬 𝗜𝗺𝗮𝗴𝗲 𝗚𝗮𝗹𝗹𝗲𝗿𝘆 𝗔𝗣𝗜 𝗶𝗻 𝗥𝗲𝗮𝗰𝘁 𝗮𝗻𝗱 𝗧𝗮𝗶𝗹𝘄𝗶𝗻𝗱𝗖𝗦𝗦.</title>
      <dc:creator>Adnan Aslam</dc:creator>
      <pubDate>Tue, 09 Mar 2021 06:36:39 +0000</pubDate>
      <link>https://dev.to/adnanaslam/-5de4</link>
      <guid>https://dev.to/adnanaslam/-5de4</guid>
      <description>&lt;p&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%2Fvl02ioarxrtzrzyusyu1.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%2Fvl02ioarxrtzrzyusyu1.png" alt="Alt Text" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;𝘍𝘰𝘳 𝘈𝘗𝘐 𝘒𝘦𝘺, 𝘠𝘰𝘶 𝘩𝘢𝘷𝘦 𝘵𝘰 𝘴𝘪𝘨𝘯𝘶𝘱 𝘪𝘯 𝘗𝘐𝘟𝘈𝘉𝘈𝘠 𝘢𝘯𝘥 𝘤𝘳𝘦𝘢𝘵𝘦 𝘢𝘤𝘤𝘰𝘶𝘯𝘵 𝘢𝘧𝘵𝘦𝘳 𝘵𝘩𝘢𝘵 𝘺𝘰𝘶 𝘩𝘢𝘷𝘦 𝘵𝘰 𝘶𝘴𝘦 𝘺𝘰𝘶𝘳 𝘬𝘦𝘺 𝘪𝘯 𝘈𝘗𝘗.𝘫𝘴 𝘍𝘪𝘭𝘦 𝘢𝘴 𝘐 𝘮𝘦𝘯𝘵𝘪𝘰𝘯𝘦𝘥.&lt;/p&gt;

&lt;p&gt;🅽🅾🆃🅴 : For more Information, Please read the README.md from the Github of the provided link.&lt;br&gt;
𝗪𝗼𝗿𝗸𝗶𝗻𝗴 𝗟𝗶𝗻𝗸 : 𝗵𝘁𝘁𝗽://𝗴.𝗿𝗲𝗰𝗼𝗿𝗱𝗶𝘁.𝗰𝗼/𝟱𝗡𝗤𝟱𝗥𝗺𝟮𝗠𝗚𝗥.𝗴𝗶𝗳&lt;/p&gt;

&lt;p&gt;You can check direct implementation on my github profile and download the code for better understanding.&lt;br&gt;
𝐋𝐢𝐧𝐤: 𝐡𝐭𝐭𝐩𝐬://𝐠𝐢𝐭𝐡𝐮𝐛.𝐜𝐨𝐦/𝐚𝐝𝐧𝐚𝐧𝐚𝐬𝐥𝐚𝐦𝐠𝐢𝐭/𝐏𝐢𝐱𝐚𝐛𝐚𝐲-𝐈𝐦𝐚𝐠𝐞-𝐆𝐚𝐥𝐥𝐞𝐫𝐲&lt;/p&gt;

&lt;p&gt;Cheers&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/adnanaslam"&gt;@adnanaslam&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>tailwindcss</category>
      <category>github</category>
    </item>
    <item>
      <title>Reverse String In JavaScript By 4 Approach</title>
      <dc:creator>Adnan Aslam</dc:creator>
      <pubDate>Sat, 06 Mar 2021 06:46:11 +0000</pubDate>
      <link>https://dev.to/adnanaslam/reverse-string-in-javascript-by-4-different-methods-167d</link>
      <guid>https://dev.to/adnanaslam/reverse-string-in-javascript-by-4-different-methods-167d</guid>
      <description>&lt;p&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%2F8v4fwzz82636ntwq8yg5.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%2F8v4fwzz82636ntwq8yg5.png" alt="Alt Text" width="800" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, you can see that how can you reverse string in different ways.&lt;/p&gt;

&lt;p&gt;This is a very common question in interview if you are going to give for front end position.&lt;/p&gt;

&lt;p&gt;Before start you have to think a little about the approach of that how can you do this so that first think you decide in your mind as think one string as "coding", Now you have to think to reverse this it will become "gnidoc".&lt;/p&gt;

&lt;p&gt;Now as you thought that this ("coding" =&amp;gt; "gnidoc") is the one that you want to do where you think of a string and reverse that from last character to the first.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using Built-In Functions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are using built-in function to reverse a string in javascript there you have to use split(), reverse() and join() in the combination from one after the other.&lt;/p&gt;

&lt;p&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%2Fjckzl6pplqndiw0z64zz.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%2Fjckzl6pplqndiw0z64zz.png" alt="Alt Text" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you have seen the built-in functions to reverser the string by normal function but you can make your code precise by using arrow functions.&lt;/p&gt;

&lt;p&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%2F0jxm114quhocu46hi7lk.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%2F0jxm114quhocu46hi7lk.png" alt="Alt Text" width="800" height="70"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Arrow Function you can write the code in one line as you can see above here you can use console.log(Solution("coders")) to print the result in you console.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Using Recursion &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here we use two methods to make the function call recursively before that you have to think a little that what recursion is and you can achieve your goal by using recursion.&lt;/p&gt;

&lt;p&gt;Recursion : This occurs "when a function call itself" now you are thinking how so as you can see in below code&lt;/p&gt;

&lt;p&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%2Fog8ww47zgxh3f33o1vxx.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%2Fog8ww47zgxh3f33o1vxx.png" alt="Alt Text" width="605" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you can see that the recursion() inside the function  is a recursive function.&lt;/p&gt;

&lt;p&gt;Now lets move how we can reverse a string using recursion so for that you have to use two methods from javascript that are substr() and charAt().&lt;/p&gt;

&lt;p&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%2Fufeefzelemagocj6wap2.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%2Fufeefzelemagocj6wap2.png" alt="Alt Text" width="563" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;substr() returns the characters from beginning in the string as above you can see.&lt;/p&gt;

&lt;p&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%2Fbyi7g6h8acsid6tnggoe.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%2Fbyi7g6h8acsid6tnggoe.png" alt="Alt Text" width="629" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;chartAt(), it returns the character from a string from where you want.&lt;/p&gt;

&lt;p&gt;Now, its time to write a program to reverse a string by recursion &lt;/p&gt;

&lt;p&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%2Fvs3i16go1nnilm6b2xz6.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%2Fvs3i16go1nnilm6b2xz6.png" alt="Alt Text" width="615" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For other two methods you can go to my github account and see how I have used Brute first Approach(that is using for loop) and by stack method(using push() and pop() methods) you can reverse a string.&lt;/p&gt;

&lt;p&gt;Note: It's not the way you are making thing happen it depends how well you can do that.&lt;/p&gt;

&lt;p&gt;Follow me on Github : &lt;a href="https://github.com/adnanaslamgit" rel="noopener noreferrer"&gt;https://github.com/adnanaslamgit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cheers&lt;br&gt;
&lt;a class="mentioned-user" href="https://dev.to/adnan"&gt;@adnan&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
