<?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: camille-arce</title>
    <description>The latest articles on DEV Community by camille-arce (@camillearce).</description>
    <link>https://dev.to/camillearce</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%2F1054263%2F19665e7e-81f0-4467-9ff7-d57477d68f3b.jpeg</url>
      <title>DEV Community: camille-arce</title>
      <link>https://dev.to/camillearce</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/camillearce"/>
    <language>en</language>
    <item>
      <title>Learning JavaScript Basics</title>
      <dc:creator>camille-arce</dc:creator>
      <pubDate>Thu, 10 Aug 2023 18:14:36 +0000</pubDate>
      <link>https://dev.to/camillearce/learning-javascript-basics-2gm7</link>
      <guid>https://dev.to/camillearce/learning-javascript-basics-2gm7</guid>
      <description>&lt;p&gt;&lt;strong&gt;Plan&lt;/strong&gt;: read online documents, enroll in code academy, and build projects.&lt;/p&gt;

&lt;p&gt;I have no experience or background with JavaScript. To tackle this problem, I will read documents going back to the history of JavaScript. Even though this may be irrelevant to some people, knowing the history of JavaScript helps me understand the language. My first programming language is Ruby so you can see me refer Ruby and how similar and different they are.&lt;/p&gt;

&lt;p&gt;To be honest, I am only reading/working on basics to set myself up better before I learn React with Redux. I want to learn JavaScript’s fundamental concepts and syntax. If you are already more knowledgeable or looking to dig deeper, this may not be suited for your needs. &lt;/p&gt;

&lt;p&gt;All information will be in this learning path: &lt;a href="https://javascript.info/"&gt;https://javascript.info/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Use this document to follow along my thought process: &lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics"&gt;https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is JavaScript
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It’s a programming language that is very popular. Used with dynamic web applications. If you get more advanced, you can create 2D and 3D games&lt;/li&gt;
&lt;li&gt;Mostly used in a browser&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  A “Hello World!” example
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;I downloaded the example folder and followed the example on Visual Studio Code.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In this example, I added one line of code in my html file (index.html) with a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag that let me add JavaScript dependencies to render a heading. I stored the string “Hello World!” in &lt;code&gt;myHeading&lt;/code&gt; variable and it override the written html heading.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Yay! This is my first JavaScript code 😊 &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Language basics crash course
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;These are similar to Ruby and most programming languages&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Variables
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Variables are containers that can have values stored.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One difference in JavaScript is it starts with &lt;code&gt;let&lt;/code&gt; to declare your variable. I have also seen &lt;code&gt;const&lt;/code&gt; and &lt;code&gt;var&lt;/code&gt; Variable names are case sensitive and can be Capitalized unlike in Ruby.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variables have data types. String, Number, Boolean, Array, Object and more&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using variables is helpful to create dynamic applications.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Comments
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Things can be commented out in one line with &lt;code&gt;//&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Multiple lines of code can be commented out with &lt;code&gt;*/&lt;/code&gt; just like CSS&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Operators
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Operators are the same as Ruby. The difference is strict equality is three equal signs &lt;code&gt;===&lt;/code&gt; and for a NOT equal… it is &lt;code&gt;!==&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V6lVCkqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vid38phdawqgbhw2w9cy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V6lVCkqL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vid38phdawqgbhw2w9cy.png" alt="example picture of a conditional statement using operators" width="624" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Conditionals
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Code structures used to test if an expression is &lt;code&gt;TRUE&lt;/code&gt; or &lt;code&gt;FALSE&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Mostly used in if-else statements&lt;/li&gt;
&lt;li&gt;The document uses this example:&lt;/li&gt;
&lt;li&gt;What I can see different from Ruby syntax is the expression is inside (parenthesis)&lt;/li&gt;
&lt;li&gt;Uses semicolons after statements.&lt;/li&gt;
&lt;li&gt;Uses curly brackets as blocks??? &lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;
  
  
  Functions
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Functions are similar to methods in Ruby&lt;/li&gt;
&lt;li&gt;There are in-built functions and you can also define functions&lt;/li&gt;
&lt;li&gt;Functions are followed by (parentheses) and take arguments separated by commas&lt;/li&gt;
&lt;li&gt;Here is an example of a defined function that multiplies two numbers
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function multiply(num1, num2) {
  let result = num1 * num2;
  return result;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I ran this in the console which can be accessed in the browser through developer tools and the function works!! &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j5fT1oDk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z55uz2u6hdz8fsyvj5gd.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j5fT1oDk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z55uz2u6hdz8fsyvj5gd.PNG" alt="function works on console" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Events
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;Real interactivity with the browser. These interactions need a handler. These are code that listen/wait for these activities and run a code when it happens. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - A prime example is mouse clicking... there are so much more and can be very specific.
&lt;/h2&gt;

</description>
      <category>secondlanguage</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>This week I learned...</title>
      <dc:creator>camille-arce</dc:creator>
      <pubDate>Tue, 04 Apr 2023 15:04:47 +0000</pubDate>
      <link>https://dev.to/camillearce/this-week-i-learned-3e4e</link>
      <guid>https://dev.to/camillearce/this-week-i-learned-3e4e</guid>
      <description>&lt;h2&gt;
  
  
  Week: 03/05/2023 - 03/11/2023
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Working with Strings in Ruby&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;'Single quoted strings #{represent} "characters" verbatim.'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Single quoted strings #{represent} "characters" verbatim.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Double-quoted strings make some substitutions: #{2 + 4}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Double-quoted strings make some substitutions: 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To join Strings, you can interpolate or concatenate&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;String concatenation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;joining of strings&lt;/li&gt;
&lt;li&gt;can join strings together using &lt;code&gt;""&lt;/code&gt; and &lt;code&gt;+&lt;/code&gt; between strings&lt;/li&gt;
&lt;li&gt;you have to add &lt;code&gt;" "&lt;/code&gt;, an empty string with a space to prevent two words being put together&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;myvar&lt;/code&gt; can be a variable inserted with a string and can add other strings with the plus sign &lt;code&gt;+&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;if you do &lt;code&gt;+=&lt;/code&gt; the myvar will be have the new concatenation as the new string&lt;/li&gt;
&lt;li&gt;strings can only be concantenated with other strings&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;String interpolation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;interpolation &lt;code&gt;#{}&lt;/code&gt; can be used within double quoted strings and it will substitute the result of a ruby code into the middle of the string&lt;/li&gt;
&lt;li&gt;the interpolation will be evaluated and the result will be converted into a string&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Interactive Ruby (irb)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;can use IRB (interactive ruby) which is integrated in Ruby if you type "irb" and hit return in terminal&lt;/li&gt;
&lt;li&gt;irb will show you the result of each expression, you dont need to call "puts" or anything&lt;/li&gt;
&lt;li&gt;type "exit" and then enter to exit out of IRB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;p vs puts vs print method&lt;/strong&gt;          &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ruby provides a method &lt;code&gt;p&lt;/code&gt; which is different than &lt;code&gt;print&lt;/code&gt; and &lt;code&gt;puts&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;p method allows us to inspect the values we pass to it and to print them out approximate the same way they would appear in a ruby code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Input: puts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            puts "   "
            puts ""
            puts nil
            puts []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is an empty terminal&lt;/p&gt;

&lt;p&gt;Input: print&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            print "    "
            print ""
            print nil
            print []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is []%&lt;/p&gt;

&lt;p&gt;Input: p&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            p "    "
            p ""
            p nil
            p []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            "     "
            ""
            nil
            []
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Some escape sequences&lt;/strong&gt;&lt;br&gt;
    - \n skips to a new line&lt;br&gt;
    - \t    indents a text&lt;br&gt;
    - \" inserts "double quotes"&lt;br&gt;
    - \' inserts 'single quotes'&lt;br&gt;
    - \ inserts a backslash: \&lt;/p&gt;

&lt;p&gt;Input: example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        puts "first line
        second line"

        puts "     new paragraph"
        puts "  He said, "Whoa.""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;to fix the line above use escape sequences&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;    puts "first line\nsecond line"
    puts "\tnew paragraph"`
    puts "He said, \"whoah\""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next Week: &lt;strong&gt;Ruby Objects&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>foundations</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
