<?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: Deep Space</title>
    <description>The latest articles on DEV Community by Deep Space (@deep_space).</description>
    <link>https://dev.to/deep_space</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%2F540415%2Fe57d0581-814f-40ec-9ba7-ca4bec580d90.jpg</url>
      <title>DEV Community: Deep Space</title>
      <link>https://dev.to/deep_space</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deep_space"/>
    <language>en</language>
    <item>
      <title>JavaScript Functions - Parameters &amp; Arguments Explained</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Sat, 05 Feb 2022 20:56:09 +0000</pubDate>
      <link>https://dev.to/deep_space/javascript-functions-parameters-arguments-explained-1788</link>
      <guid>https://dev.to/deep_space/javascript-functions-parameters-arguments-explained-1788</guid>
      <description>&lt;p&gt;Learn what parameters, arguments, and return statements are with videos and animations.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MMNDr_U21-0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;




&lt;p&gt;Let’s understand what is a JavaScript Parameter &amp;amp; Argument.&lt;br&gt;
Also what the return statement is.&lt;br&gt;
In the previous article, we learned about the &lt;strong&gt;&lt;a href="https://dev.to/deep_space/javascript-functions-explained-part-1-4ldh"&gt;general idea of a function, function definition &amp;amp; function invocation.&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
Visit to refresh your knowledge, if you want.&lt;br&gt;
Let’s get a little more advanced with functions.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Table Of Contents:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;JavaScript &lt;code&gt;Variables in Functions&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;JavaScript Functions-&lt;code&gt;Parameters&lt;/code&gt; &amp;amp; &lt;code&gt;Arguments&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;JavaScript &lt;code&gt;return&lt;/code&gt; statement&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  JavaScript Variables in functions
&lt;/h2&gt;

&lt;p&gt;JavaScript &lt;strong&gt;functions&lt;/strong&gt; can also &lt;strong&gt;contain variables&lt;/strong&gt;.&lt;br&gt;
Let's create a function called &lt;code&gt;addNumbers()&lt;/code&gt; to demonstrate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function addNumbers() {
const a = 5;
const b = 10;
const sum = a + b; // 5 + 10
return sum;
}
console.log(addNumbers());

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Explanation:&lt;/strong&gt;&lt;br&gt;
In the function block &lt;code&gt;{}&lt;/code&gt;, we have 3 variables &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;sum&lt;/code&gt;, with values.&lt;br&gt;
In the end, we have &lt;code&gt;return&lt;/code&gt; keyword.&lt;br&gt;
Followed by function call &lt;code&gt;addNumbers();&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;But we can change the above code, using &lt;code&gt;parameters&lt;/code&gt; &amp;amp; &lt;code&gt;arguments&lt;/code&gt; to replace variable declaration and assignment.&lt;/p&gt;


&lt;h2&gt;
  
  
  JavaScript Functions - Parameters &amp;amp; Arguments
&lt;/h2&gt;

&lt;p&gt;JavaScript function &lt;code&gt;parameters&lt;/code&gt; are the names (placeholders) for values.&lt;br&gt;
JavaScript function &lt;code&gt;arguments&lt;/code&gt; are the actual values of parameters.&lt;/p&gt;

&lt;p&gt;Let me explain it to you like we are having a street conversation, or talk in an informal language.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parameters are variable names. The word &lt;strong&gt;parameter&lt;/strong&gt; is just a fancy word for saying &lt;strong&gt;variable name&lt;/strong&gt; in JS.&lt;/li&gt;
&lt;li&gt;Arguments are the actual values of those variables. The word argument is just another fancy word for saying &lt;strong&gt;variable value&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;So we use parameters(variable names) to refer to argument (variable values)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Makes sense? Let's see it in code, or better convert the above function's variables &amp;amp; their values to parameters &amp;amp; arguments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function addNumbers(a, b) {
const sum = a + b; // 5 + 10
return sum;
}
console.log(addNumbers(5, 10));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Code Explanation:&lt;/strong&gt;&lt;br&gt;
Instead of writing variable names inside the function block &lt;code&gt;{}&lt;/code&gt;.&lt;br&gt;
We wrote them inside the parentheses &lt;code&gt;()&lt;/code&gt;.&lt;br&gt;
And we gave arguments (actual variable values) on function call &lt;code&gt;addNumbers(5, 10)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Most people can’t see the relationship between parameters &amp;amp; arguments (including myself).&lt;br&gt;
 So I decided to make a video, animations, and pictures to help you visualize.&lt;/p&gt;

&lt;p&gt;Notice, we don’t need to use a &lt;strong&gt;JavaScript keyword&lt;/strong&gt; &lt;code&gt;const&lt;/code&gt;, &lt;code&gt;let&lt;/code&gt; or &lt;code&gt;var&lt;/code&gt; to declare the variables &lt;code&gt;a&lt;/code&gt; and &lt;code&gt;b&lt;/code&gt;, inside the &lt;code&gt;()&lt;/code&gt; parentheses.&lt;/p&gt;




&lt;h2&gt;
  
  
  JavaScript return statement
&lt;/h2&gt;

&lt;p&gt;The JavaScript &lt;code&gt;return&lt;/code&gt; statement as it sounds, it returns something.&lt;br&gt;
When the JavaScript functions reaches the return statement, it will stop the function execution and returns the value to the caller.&lt;/p&gt;




&lt;p&gt;Thanks for reading, follow me on my &lt;a href="https://www.youtube.com/deepspacex"&gt;Youtube Channel (Deep Space)&lt;/a&gt;.&lt;br&gt;
And here on the dev community, too.&lt;br&gt;
I love coffee, you can buy me one here "&lt;a href="https://www.buymeacoffee.com/deepspacex"&gt;Buy me a coffee&lt;/a&gt;"&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>functions</category>
      <category>arguments</category>
      <category>parameters</category>
    </item>
    <item>
      <title>JavaScript Functions Explained - Part 1</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Sun, 16 Jan 2022 12:51:09 +0000</pubDate>
      <link>https://dev.to/deep_space/javascript-functions-explained-part-1-4ldh</link>
      <guid>https://dev.to/deep_space/javascript-functions-explained-part-1-4ldh</guid>
      <description>&lt;p&gt;Easy to understand example codes, animations (hand made by me). This article and videos is designed for both "Desktop" &amp;amp; "Mobile" users.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/-EYzUJE2tWo"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you are a visual "mobile" person, the above video is for you.&lt;br&gt;
In JavaScript Variables, we learned where&amp;amp;how to stick your Data. But what about the actions that manipulate the Data? We need functions.&lt;/p&gt;



&lt;blockquote&gt;
&lt;p&gt;Table Of Contents:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;What is a function ? (General idea of a function)&lt;/li&gt;
&lt;li&gt;JavaScript Functions&lt;/li&gt;
&lt;li&gt;JavaScript Functions - Call/Invoke Function&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  What is a function ? (General idea of a function)
&lt;/h2&gt;

&lt;p&gt;There are many different explanations for the same thing. But I'll take my own approach. Because, that's how I personally learn myself.&lt;br&gt;
Instead of talking about specific functions. First, let's talk about the &lt;strong&gt;general idea of a function&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can think of a function like a machine that :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can &lt;strong&gt;Take Input&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process&lt;/strong&gt; it&lt;/li&gt;
&lt;li&gt;And &lt;strong&gt;give output/result&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2Q3Jxl7k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drcliphdry73b1gjji4d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2Q3Jxl7k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/drcliphdry73b1gjji4d.png" alt="general idea of a function. How a function works" width="880" height="172"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  JavaScript Functions
&lt;/h2&gt;

&lt;p&gt;A JavaScript function, is a block of code designed to perform a particular task. They also can be reused &amp;amp; modified.&lt;br&gt;
A JavaScript function is executed/activated when something calls/invokes it.&lt;/p&gt;

&lt;p&gt;To create a function, write the keyword &lt;u&gt;function&lt;/u&gt;&lt;br&gt;
Then give it a name like &lt;u&gt;doSomething&lt;/u&gt; or whatever you name it (be descriptive).&lt;br&gt;
 Function names can contain letters, digits, underscores, and dollar signs (same rules as variables).&lt;/p&gt;

&lt;p&gt;At the end of the function name use &lt;strong&gt;()&lt;/strong&gt; a pair of parenthesis &lt;strong&gt;&lt;u&gt;doSomething()&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
A set of curly braces &lt;strong&gt;{}&lt;/strong&gt; at the end like so &lt;strong&gt;&lt;u&gt;doSomething () {}&lt;/u&gt;&lt;/strong&gt; to define the block, that the function will execute when its called/invoked.&lt;/p&gt;

&lt;p&gt;Inside there, I'll just print my name to the console, to make it a simple function.&lt;/p&gt;

&lt;p&gt;Example Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function doSomething() {
console.log("Lia Sue");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you check the console, nothing hapens. That's because we actually have to invoke/call the functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript Functions - Call/Invoke Function
&lt;/h2&gt;

&lt;p&gt;The way we invoke or call a function is, we have to use or type its name. After we declare/create the function. At the end of the name put a pair of parenthesis like so &lt;strong&gt;&lt;u&gt;doSomething ();&lt;/u&gt;&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;// Declaring a function 
function doSomething() {
console.log("Lia Sue");
}
// Invoke / call function
doSomethiing();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Hope this picture will help you visualize&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--249IGALN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4wbn614yrldubw22yye.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--249IGALN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4wbn614yrldubw22yye.png" alt="JavaScript functions explanation" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;JavaScript Functions — Video for Desktop users&lt;/p&gt;

&lt;p&gt;If you are reading it from a Desktop device and find vertical video annoying. Here’s a big video designed for Desktop, Enjoy!&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MJC3G9YN_yw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>functional</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Build a Math Game With JavaScript</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Fri, 15 Oct 2021 20:10:20 +0000</pubDate>
      <link>https://dev.to/deep_space/build-a-math-game-with-javascript-3pp8</link>
      <guid>https://dev.to/deep_space/build-a-math-game-with-javascript-3pp8</guid>
      <description>&lt;p&gt;Let's build a Math Game With JavaScript. &lt;br&gt;
Note: I'm working on the written version of this project for the dev.to community.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/C2NYb3EWFjk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>JavaScript Functions</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Sat, 19 Dec 2020 22:20:10 +0000</pubDate>
      <link>https://dev.to/deep_space/javascript-functions-27e</link>
      <guid>https://dev.to/deep_space/javascript-functions-27e</guid>
      <description>&lt;p&gt;Summary: In this tutorial,  you'll learn how to create a function in JavaScript and invoke/call it or start/make it work or activate  it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Furm5u4atwzkgzoe37lkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Furm5u4atwzkgzoe37lkm.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is a function?
&lt;/h1&gt;

&lt;p&gt;A function is like a machine&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 takes input &lt;/li&gt;
&lt;li&gt;2 processes it&lt;/li&gt;
&lt;li&gt;3 gives output
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  If you are a visual person. Here's a video.
&lt;/h1&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/MJC3G9YN_yw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  If you like reading. Below is the written version of the video.
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1 Create a Function in JavaScript
&lt;/h2&gt;

&lt;p&gt;To create a function in JavaScript, use the word&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;function&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;Then give your function a name like &lt;code&gt;doSomething&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;a pair of parentheses like &lt;code&gt;()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;and curly braces like &lt;code&gt;{}&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All together in a code editor, it looks like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;doSomething&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// code to be executed&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Explanation of Code
&lt;/h2&gt;

&lt;p&gt;a) The word &lt;code&gt;function&lt;/code&gt; is a &lt;code&gt;JavaScript keyword&lt;/code&gt;. It tells JavaScript 'Hey, JavaScript, we are about to create a function'&lt;br&gt;
b) After you write the function keyword you have to give it a name. In this example I gave it &lt;code&gt;doSomething&lt;/code&gt; but you can name your function anything you want. (the same rules apply as naming variables).&lt;br&gt;
c) The opening and closing parentheses &lt;code&gt;()&lt;/code&gt; takes &lt;code&gt;variables&lt;/code&gt; called &lt;code&gt;function parameters&lt;/code&gt; we'll talk about those in the next post/video.&lt;br&gt;
d) Inside the curly braces &lt;code&gt;{}&lt;/code&gt; you put codes that you want your function to run or process&lt;br&gt;
e) But the code above doesn't do anything because I just wanted to show/explain functions in their purest form.&lt;/p&gt;
&lt;h1&gt;
  
  
  Calling or Activating your Function
&lt;/h1&gt;

&lt;p&gt;Now let's take the code above and log something to the browser console. Like 'Hello Lia'&lt;br&gt;
To call or activate your function, you must use its name after your function like so: &lt;code&gt;doSomething;&lt;/code&gt; &lt;br&gt;
All together it looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;doSomething&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hello Lia&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;doSomething&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you check your browser console, you should see &lt;code&gt;Hello Lia&lt;/code&gt; message or text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your task
&lt;/h2&gt;

&lt;p&gt;Your task for this tutorial is to write a function that logs to the console 'Hello YourName '&lt;br&gt;
Thanks for reading&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>functional</category>
      <category>functions</category>
      <category>youtube</category>
    </item>
    <item>
      <title>JavaScript strings [bracket notation]</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Fri, 18 Dec 2020 21:07:18 +0000</pubDate>
      <link>https://dev.to/deep_space/javascript-strings-bracket-notation-4hhe</link>
      <guid>https://dev.to/deep_space/javascript-strings-bracket-notation-4hhe</guid>
      <description>&lt;p&gt;&lt;code&gt;Summary&lt;/code&gt;: Using bracket notation with strings.&lt;br&gt;
&lt;code&gt;Note:&lt;/code&gt;It's late here, tomorrow I'll make this post an article for those who love reeading.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/UyuwjKj-TJw"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>bracketnotation</category>
      <category>strings</category>
      <category>youtube</category>
    </item>
    <item>
      <title>CSS project to sharpen your skills</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Tue, 15 Dec 2020 14:15:52 +0000</pubDate>
      <link>https://dev.to/deep_space/css-folder-and-hover-effect-ui-code-2cab</link>
      <guid>https://dev.to/deep_space/css-folder-and-hover-effect-ui-code-2cab</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/p8HBw7m0_J4"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this post and video, I'm gonna show you how to create a CSS folder and files in it. It's an animated project just to sharpen your CSS skills.&lt;/p&gt;

&lt;p&gt;See on Codepen&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/Firdavsi_Q/embed/qBNoeYQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Time Codes for the video&lt;/code&gt;:&lt;br&gt;
Times Codes:&lt;br&gt;
0:00 Intro&lt;br&gt;
01:08 Adding HTML tags&lt;br&gt;
02:24 Split the screen&lt;br&gt;
02:50 Styling the body tag&lt;br&gt;
05:35 Styling the back of the folder&lt;br&gt;
07:00 Styling the small box&lt;br&gt;
09:00 Styling the papers/files inside the folder&lt;br&gt;
12:08 Styling the papers using nth-child selector&lt;br&gt;
13:50 The Curtain or front page of the folder&lt;br&gt;
17:26 Animating the folder and all the files &lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>animation</category>
      <category>youtube</category>
    </item>
    <item>
      <title>JavaScript String length Property</title>
      <dc:creator>Deep Space</dc:creator>
      <pubDate>Mon, 14 Dec 2020 21:58:35 +0000</pubDate>
      <link>https://dev.to/deep_space/javascript-string-length-property-4bfd</link>
      <guid>https://dev.to/deep_space/javascript-string-length-property-4bfd</guid>
      <description>&lt;p&gt;Hey there! &lt;br&gt;
In this post and video, I'm going to explain how to use JavaScript &lt;code&gt;length property&lt;/code&gt;  with strings to find/count the number of characters in a string&lt;/p&gt;

&lt;p&gt;When you use the &lt;code&gt;length property&lt;/code&gt; with JavaScript strings it counts the number of characters you have in that string and returns a/an positive/integer number. That includes empty string, empty space.&lt;/p&gt;

&lt;p&gt;Let's create 2 variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Ada&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;myData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// returns 3&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;myData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The way it's used is after or at the end of a variable with a &lt;code&gt;.length&lt;/code&gt; like so &lt;code&gt;firstName.length&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you check the &lt;code&gt;typeof&lt;/code&gt; both variables the &lt;code&gt;firstName&lt;/code&gt; is a string.&lt;br&gt;
And &lt;code&gt;myData&lt;/code&gt; is a number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// string&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;myData&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;    &lt;span class="c1"&gt;// number&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are a &lt;code&gt;visual person&lt;/code&gt; here's a &lt;code&gt;video tutorial&lt;/code&gt; with code editor and whiteboard example.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/92MHMhSR06E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Thanks for reading this.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>youtube</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
