<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jurasia Britton on Medium]]></title>
        <description><![CDATA[Stories by Jurasia Britton on Medium]]></description>
        <link>https://medium.com/@jurasiabritton?source=rss-d253126237c0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*M_z6rUnqakD1vJbP</url>
            <title>Stories by Jurasia Britton on Medium</title>
            <link>https://medium.com/@jurasiabritton?source=rss-d253126237c0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:23:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jurasiabritton/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaScript Variable]]></title>
            <link>https://medium.com/@jurasiabritton/javascript-variable-a59edac0112a?source=rss-d253126237c0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a59edac0112a</guid>
            <category><![CDATA[variables]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Jurasia Britton]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 15:03:42 GMT</pubDate>
            <atom:updated>2023-01-04T15:03:42.113Z</atom:updated>
            <content:encoded><![CDATA[<p>What are JavaScript variables? How do you initialize/declare the JavaScript variable? How do you call the variable? Today, I will be discussing JavaScript Variables and their importance in JavaScript.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*OpuXdwwtEoqLmicZqEBH-w.png" /><figcaption>banners_bg-pack-JavaScript Variable Data Types.png</figcaption></figure><p>I believe it’s important to understand what JavaScript is before we talk about the variables. JavaScript is a programming language or many would say scripting language. According to Mdn web docs, “This programming language allows you to implement complex features on a web page”. When you go on any web page, the interactivity that goes on in the web page is JavaScript. JavaScript is the one of the layers of web development. Below is an picture of the three layers of web development. JavaScript is the behavioral aspect of the web page, as stated before the interactivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/286/0*XUjHf_MA3A5a2AGO" /><figcaption>1training.org</figcaption></figure><p>Now that we know what JavaScript is we can talk about JavaScript variables. A variable in JavaScript is like a jar where you can store values for later use. When we are ready to use it, we ask for the data in JavaScript. When choosing the variable name we want to make sure to choose simple variables. Choosing the right variables will help make the code easier to understand. The variables need to start with a lowercase word and each word after the first word will start with a capital letter.</p><p>For Example: jarToolBox</p><p>The next thing to do with the variable is to initialize or declare the variable. We do this by using const, let, or var. Var should be avoided because it can cause debugging issues. According to Flatiron Phase-1, “You will likely never need to use var, unless in legacy code and older StackOverflow posts so its important to be familiar with it”. Below are examples of how let and const are used to initialize the variable.</p><pre>let jarToolBox;<br>//or <br>const jarToolBox;</pre><p>When you just add let or const to your variable name this is called declaring the variable. When you declare a variable without giving it a value it will give the value of undefined.</p><p>For example:</p><pre>let jarToolBox;<br>//console.log(jarToolBox)<br>//undefined</pre><p>If you asked yourself, which one should I use, let me just tell you they are similar but different in a way, let is often found in block scope, but can be used in each scope. I wont go into depth on what block scope is but what I will say is there are three types of scope in JavaScript. They include global, function, and block scope. Function and block scope or local scopes. My next blog will be on Scope, make sure to follow me. Now, if you use let to initialize variables, the values can be changed as with const the value can’t be changed.</p><p>For example:</p><pre>let jarToolBox = 10;<br>//can be changed to <br>let jarToolBox = 12;<br><br>//where as with const the variable can&#39;t be change<br>const jarToolBox = 10; </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0rNIiN9Frqoe25Bn.jpeg" /><figcaption>miro.medium.com</figcaption></figure><p>Fun Fact: You can declare a variable without using let, const or var. When you do this the variable becomes a global variable. It is best practice to properly declare a variable.</p><p>Example:</p><pre>jarToolBox = 10;<br>// This will show up as an error, because of the strict mode</pre><p>Variables can hold different types of data, to include strings, numbers, Booleans and more. “A string is an object used to represent and manipulate a sequence of characters”(JavaScript, 2023,Mdn). Numbers are straight forward, they represent numbers such as 24 or 2.4. Booleans are also objects that represent a value of either true or false. Below are examples of each data type.</p><pre>//string<br>let newVariable = &quot;Hello, World&quot;;<br>//numbers<br>let newVariableTwo = 23;<br>//boolean<br>let newVariableThree = true;</pre><p>Now let’s discuss retrieving the variable at a later time. When it is time to access the variable again, you can do so by using console.log.</p><p>For example:</p><pre>console.log(jarToolBox)<br>//outputs 10</pre><p>You can also call the variable anytime by invoking it’s name. For example:</p><pre>jarToolBox; // =&gt; 10</pre><p>JavaScript Variables as you can see are very important. They hold the data needed for programming. Understanding how to pick variable names, declare variables and call them is the part of the foundation to JavaScript, once you learn this skill you can move on and learn more about the exciting world of JavaScript. I personally enjoy learning and I feel like I’m always going to learn something new about JavaScript as a continue my journey as a Software Engineer.</p><p>Here is a link, to practice JavaScript variables. <a href="https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Test_your_skills:_variables">https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Test_your_skills:_variables</a></p><p>My word of advice for today- The only way you can fail is if you give up.</p><p>Sources</p><p>JavaScript Variable. 2023. <a href="https://developer.mozilla.org/en-US/search?q=javascript+variables">https://developer.mozilla.org/en-US/search?q=javascript+variables</a></p><p>JavaScript Variables. 2023 <a href="https://learning.flatironschool.com/courses/5262/pages/javascript-variables?module_item_id=512144">https://learning.flatironschool.com/courses/5262/pages/javascript-variables?module_item_id=512144</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a59edac0112a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>