<?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: Babacar Diakite</title>
    <description>The latest articles on DEV Community by Babacar Diakite (@babacar_diakite_c72e6eee2).</description>
    <link>https://dev.to/babacar_diakite_c72e6eee2</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%2F1828914%2Ffbb4c01b-24b3-42f2-848d-b3898389e66e.png</url>
      <title>DEV Community: Babacar Diakite</title>
      <link>https://dev.to/babacar_diakite_c72e6eee2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/babacar_diakite_c72e6eee2"/>
    <language>en</language>
    <item>
      <title>Looping over string</title>
      <dc:creator>Babacar Diakite</dc:creator>
      <pubDate>Wed, 07 Aug 2024 01:46:40 +0000</pubDate>
      <link>https://dev.to/babacar_diakite_c72e6eee2/looping-over-string-1l49</link>
      <guid>https://dev.to/babacar_diakite_c72e6eee2/looping-over-string-1l49</guid>
      <description>&lt;p&gt;Good day. I am attempting to iterate over a string and mask each word with an odd index. The following is my current approach, but I am not yet achieving the desired outcome. Could anyone kindly assist me in identifying the source of the issue?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const test =
  "Living in that house and using the pool would be like a summer vacation, not a job";
const stringLitertor = (data) =&amp;gt; {
  data.split(" ").forEach((word, index) =&amp;gt; {
    if ((word[index] = index % 2) !== 0) {
      word.replace(word, "****");
    }
  });
  return data;
};

console.log(stringLitertor(test));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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