<?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: Raul Crespo</title>
    <description>The latest articles on DEV Community by Raul Crespo (@crespo).</description>
    <link>https://dev.to/crespo</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%2F815484%2Ffdf15840-ec05-4697-a5e8-87e2b1ea6ac7.jpeg</url>
      <title>DEV Community: Raul Crespo</title>
      <link>https://dev.to/crespo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/crespo"/>
    <language>en</language>
    <item>
      <title>Summary - Section 2</title>
      <dc:creator>Raul Crespo</dc:creator>
      <pubDate>Fri, 01 Mar 2024 13:45:48 +0000</pubDate>
      <link>https://dev.to/crespo/summary-section-2-3n72</link>
      <guid>https://dev.to/crespo/summary-section-2-3n72</guid>
      <description>&lt;h2&gt;
  
  
  Fundamentals Part 1
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.udemy.com/course/the-complete-javascript-course/"&gt;Jonas Schmedtmann Course&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Primitive Data Types
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Number = Floating point numbers and integers&lt;/li&gt;
&lt;li&gt;String = Sequence of characters between single quotes (''), double quotes ("") or backticks (``)&lt;/li&gt;
&lt;li&gt;Boolean = Logical, true or false&lt;/li&gt;
&lt;li&gt;Undefined = Value of a variable that wasn't yet defined&lt;/li&gt;
&lt;li&gt;Null = Empty value&lt;/li&gt;
&lt;li&gt;Symbol = Unique value and cannot be changed&lt;/li&gt;
&lt;li&gt;BigInt = Larger integer numbers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JavaScript has dynamic typing, which means that we don't define which type of value a variable will hold. Furthermore, variables don't have types, values do.&lt;/p&gt;

&lt;h3&gt;
  
  
  let, const and var
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;let = block-scoped, defines variables that can be mutated&lt;/li&gt;
&lt;li&gt;const = defines variables that cannot be mutated&lt;/li&gt;
&lt;li&gt;var = function-scoped, defines variables that can be mutated (legacy)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Expressions and Operators
&lt;/h3&gt;

&lt;p&gt;Source: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_operators"&gt;Expressions and Operators&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Operator Precedence
&lt;/h3&gt;

&lt;p&gt;Source: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_precedence#table"&gt;Operator Precedence table&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Strings and Template Literals
&lt;/h3&gt;

&lt;p&gt;As said before, we can use single quotes ('') and double quotes ("") to delimit a string, but we can also use backticks (``), and they define template literals.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(`Hello! My name is ${user.name} and I am a ${user.job}.
How can I help you?`); // Output: 'Hello! My name is Raul and I am a Software Developer.
                                   How Can I help you?'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  If-Else Statements
&lt;/h3&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if (expression) {
} else if (expression) {
} else {
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Type Conversion and Type Coercion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Type Conversion = When you manually convert a value from a type to another type.&lt;/li&gt;
&lt;li&gt;Type Coercion = When JavaScript automatically converts a type to another type.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example Type Conversion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(Number('2024')); // Output: 2024
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example Type Coercion:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log('20' + 24); // Output: '2024'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Truthy and Falsy Values
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;There are 5 falsy values, them being:&lt;/li&gt;
&lt;li&gt;- 0&lt;/li&gt;
&lt;li&gt;- ''&lt;/li&gt;
&lt;li&gt;- undefined&lt;/li&gt;
&lt;li&gt;- null&lt;/li&gt;
&lt;li&gt;- NaN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything else is a truthy value, it means that if converted to boolean, they will be converted to the truth value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
.

### Equality Operators (== vs. ===)

- === Strict Equality Operator. Does not perform type coercion
- == Loose Equality Operator. Does perform type coercion (avoid using it)

### Basic Binary Logical Operators

- &amp;amp;&amp;amp; - AND
- || - OR
- ! - NOT

### Switch Statement

Example usage:


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

&lt;/div&gt;

&lt;p&gt;const foo = 1;&lt;/p&gt;

&lt;p&gt;switch (foo) {&lt;br&gt;
    case 0:&lt;br&gt;
        console.log('That is zero.');&lt;br&gt;
        break;&lt;br&gt;
    case 1:&lt;br&gt;
        console.log('Got it!");&lt;br&gt;
        break;&lt;br&gt;
    default:&lt;br&gt;
        console.log('You failed.');&lt;br&gt;
}&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


## Statements and Expressions

- Expressions are pieces of code that produces a value
Example:

 ```3 + 4 or 1991 or true &amp;amp;&amp;amp; false```



- Statements are bigger pieces of code that translate actions
If-Else statement is an example

## Ternary Operator



```[expression] ? [if true] : [if false]```

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

&lt;/div&gt;

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