<?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: D4nielRocha</title>
    <description>The latest articles on DEV Community by D4nielRocha (@d4nielrocha).</description>
    <link>https://dev.to/d4nielrocha</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%2F271103%2F187ec177-9321-4acc-8407-af224984ff5f.png</url>
      <title>DEV Community: D4nielRocha</title>
      <link>https://dev.to/d4nielrocha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/d4nielrocha"/>
    <language>en</language>
    <item>
      <title>JavaScript Begginer Loop+Conditional question</title>
      <dc:creator>D4nielRocha</dc:creator>
      <pubDate>Wed, 13 Nov 2019 14:52:34 +0000</pubDate>
      <link>https://dev.to/d4nielrocha/javascript-begginer-loop-conditional-question-4ibf</link>
      <guid>https://dev.to/d4nielrocha/javascript-begginer-loop-conditional-question-4ibf</guid>
      <description>&lt;p&gt;Hi there, &lt;/p&gt;

&lt;p&gt;I've just started to study javascript and I'm reading the Eloquent Javascript book, recommended by several friends and websites I've read. &lt;br&gt;
I just finished the 3 chapter where I had to write one particular piece of code to answer to one of the challenges on the book. I couldn't do it at first and them I looked at the answer provided by the book, and I still can't figure it out why it was done like that.&lt;/p&gt;

&lt;p&gt;Could somebody try to explain me in a better way as to why this code is written like this? Thank you so much for all replies.&lt;/p&gt;

&lt;p&gt;var  size = 8;&lt;br&gt;
for (var i = 1; i &amp;lt;= size; i++) {&lt;/p&gt;

&lt;p&gt;var line = (i % 2)?'':' ';&lt;/p&gt;

&lt;p&gt;for (var j = 1; j &amp;lt; size; j++) { &lt;br&gt;
      line += (j % 2)?'#':' ';&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;console.log(line);&lt;/p&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;The task was to write a code that would produce a table chess with spaces and # simbols with a size of 8x8.&lt;/p&gt;

&lt;p&gt;What I can't quite understand is: &lt;/p&gt;

&lt;p&gt;1- Why we use (i % 2) in this case?&lt;br&gt;
2-What does the ? symbol represents on this statement?&lt;/p&gt;

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