<?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: DNeh</title>
    <description>The latest articles on DEV Community by DNeh (@dneh).</description>
    <link>https://dev.to/dneh</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%2F847357%2Fe6e5cfb3-fb1b-41dc-aa79-8fe21d92f905.jpg</url>
      <title>DEV Community: DNeh</title>
      <link>https://dev.to/dneh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dneh"/>
    <language>en</language>
    <item>
      <title>Assignment of elements of an array</title>
      <dc:creator>DNeh</dc:creator>
      <pubDate>Thu, 14 Apr 2022 11:57:30 +0000</pubDate>
      <link>https://dev.to/dneh/assignment-of-elements-of-an-array-304g</link>
      <guid>https://dev.to/dneh/assignment-of-elements-of-an-array-304g</guid>
      <description>&lt;p&gt;Hi, I'm not a programming expert, I need a little help.&lt;/p&gt;

&lt;p&gt;Using JavaScript, I would like to create an array [5, 6, 7, 8, 9, 10] and then I need a loop that fills me with another array called Role [].&lt;/p&gt;

&lt;p&gt;If (array == 5) I randomly want 3 Role elements to have the value "Resistance" and 2 "Spy".&lt;br&gt;
Else if (array == 6) I randomly want 4 Role elements to have the value "Resistance" and 2 "Spy".&lt;br&gt;
Else if (array == 7) I randomly want 4 Role elements to have the value "Resistance" and 3 "Spy".&lt;br&gt;
Else if (array == 8) I randomly want 5 Role elements to have the value "Resistance" and 3 "Spy".&lt;br&gt;
Else if (array == 9) I randomly want 6 Role elements to have the value "Resistance" and 3 "Spy".&lt;br&gt;
Else if (array == 10) I randomly want 6 Role elements to have the value "Resistance" and 4 "Spy".&lt;/p&gt;

&lt;p&gt;Thank you in advance.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
      <category>help</category>
    </item>
  </channel>
</rss>
