<?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: Jazmine</title>
    <description>The latest articles on DEV Community by Jazmine (@jptdev).</description>
    <link>https://dev.to/jptdev</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%2F1037485%2F338232ad-b814-486f-8628-e3957106d5d2.png</url>
      <title>DEV Community: Jazmine</title>
      <link>https://dev.to/jptdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jptdev"/>
    <language>en</language>
    <item>
      <title>"!" and "?" in Ruby Methods</title>
      <dc:creator>Jazmine</dc:creator>
      <pubDate>Tue, 18 Jul 2023 20:01:43 +0000</pubDate>
      <link>https://dev.to/jptdev/-and-in-ruby-methods-3i46</link>
      <guid>https://dev.to/jptdev/-and-in-ruby-methods-3i46</guid>
      <description>&lt;p&gt;Thanks to a meeting with a student, I learned about some neat ways Ruby improves the readability of its code!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ruby methods ending with &lt;code&gt;!&lt;/code&gt; indicates that it will modify the object it's acting on.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example, using the &lt;code&gt;reverse&lt;/code&gt; method will return the array with the items in the reversed order. When you call the array again, it will return as it originally was.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = ["red", "yellow", "blue", "pink"]
a.reverse 
# =&amp;gt; ["pink", "blue", "yellow", "red"]

a = ["red", "yellow", "blue", "pink"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, when you add the &lt;code&gt;!&lt;/code&gt; to the end of the method, it will overwrite it, and modify the array!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a = ["red", "yellow", "blue", "pink"]
a.reverse!
# =&amp;gt; ["pink", "blue", "yellow", "red"]

a = ["pink", "blue", "yellow", "red"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Ruby methods ending with &lt;code&gt;?&lt;/code&gt; indicates that it will return a boolean.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;4.odd? # =&amp;gt; false
5.odd? # =&amp;gt; true
6.even? # =&amp;gt; true

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Today I learned...</title>
      <dc:creator>Jazmine</dc:creator>
      <pubDate>Wed, 15 Mar 2023 20:56:16 +0000</pubDate>
      <link>https://dev.to/jptdev/today-i-learned-4mb2</link>
      <guid>https://dev.to/jptdev/today-i-learned-4mb2</guid>
      <description>&lt;p&gt;We started on HTML and CSS basics this week! We laid out the basics of HTML by creating a simple rock-paper-scissors webpage. &lt;/p&gt;

&lt;p&gt;We began by getting acclimated to the very basics of GitPod and VSCode. Our first HTML lesson consisted of learning the syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;a href="https://github.com/"&amp;gt;
   Go to GitHub
&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The syntax consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The opening tag &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The closing tag &lt;code&gt;&amp;lt;/a&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The content in between &lt;code&gt;Go to GitHub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Attributes inside the opening tag &lt;code&gt;href=""&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And collectively, we call this an &lt;strong&gt;element&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elements can have more than one attribute and contain other elements!&lt;/li&gt;
&lt;li&gt;The element inside is called the &lt;strong&gt;child element&lt;/strong&gt;, while the element outside is the &lt;strong&gt;parent element&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also learned the boilerplate of HTML.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html
&amp;lt;html&amp;gt;
   &amp;lt;head&amp;gt;
      &amp;lt;meta charset="utf-8"&amp;gt;
      &amp;lt;title&amp;gt;Document&amp;lt;/title&amp;gt;
      &amp;lt;meta name="viewport" content="width=device-width"&amp;gt;
   &amp;lt;/head&amp;gt;
   &amp;lt;body&amp;gt;
      &amp;lt;!-- content to be displayed to the user --&amp;gt;
   &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now more on attributes, some only make sense in specific elements. Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;href=""&lt;/code&gt; is for &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; elements and specifies where to take the user when they click on the link.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src=""&lt;/code&gt; is for &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; elements and specifies the url of the image to load.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;for=""&lt;/code&gt; is for &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt; elements and specifies which input element it is paired with. &lt;/li&gt;
&lt;/ul&gt;

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