<?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 Hiruni Sewwandi on Medium]]></title>
        <description><![CDATA[Stories by Hiruni Sewwandi on Medium]]></description>
        <link>https://medium.com/@hirunisew99?source=rss-90ae1dbf8f86------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QstIJPAcfNczVRyO</url>
            <title>Stories by Hiruni Sewwandi on Medium</title>
            <link>https://medium.com/@hirunisew99?source=rss-90ae1dbf8f86------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 24 May 2026 02:25:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hirunisew99/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 Variables]]></title>
            <link>https://medium.com/@hirunisew99/javascript-variables-fb0d009b08d0?source=rss-90ae1dbf8f86------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb0d009b08d0</guid>
            <dc:creator><![CDATA[Hiruni Sewwandi]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 08:51:50 GMT</pubDate>
            <atom:updated>2023-12-01T08:51:50.272Z</atom:updated>
            <content:encoded><![CDATA[<p>In JavaScript, variables are used to store and manage data in your programs. There are three keywords for declaring variables: `let`, `const`, and `var`. Each has its own purpose and rules.</p><p>Let’s explore them one by one.😊</p><p>1. let</p><p>The let keyword was introduced in ES6(2015)</p><ul><li>Variables defined with let cannot be Redeclared.</li><li>Variables defined with let must be Declared before use.</li></ul><p>• Variables defined with let have Block Scope</p><p>➢ <em>let cannot be Redeclared. Variables defined with let cannot be redeclared.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7x9GW9n250Cd3c6uzw2Kxg.png" /></figure><p>With var, we can be redeclared..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*bYOMIJaP1j_Zm5evwpNUSw.png" /></figure><p><em>Initialization</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*RgEx9YnbPzzLrm_lWvqSaA.png" /></figure><p>2. var</p><p>• Variables declared with the var keyword can NOT have block scope.</p><ul><li>Variables declared inside a { } block can be accessed from outside the block.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7zu-rzyolBulUlM5V3_E5g.png" /></figure><p><em>➢ Redeclaring variables using var.</em></p><ul><li>Redeclaring a variable using the var keyword can impose problems.</li></ul><p>• Redeclaring a variable inside a block will also redeclare the variable outside the block:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WldJaiToDAnc0jO1Gx5MoA.png" /></figure><p><em>➢ Initialization</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9bsRDPrx2VhqROLdNhLn7w.png" /></figure><p>3. Const</p><ul><li>The const keyword was introduced in ES6 (2015)</li><li>Variables defined with const cannot be Redeclared.</li><li>Variables defined with const cannot be Reassigned.</li><li>Variables defined with const have Block Scope.</li></ul><p><em>➢ Cannot be reassigned.</em></p><ul><li>A const variable cannot be reassigned.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Uf7K5XYMSTud_AcoHTx2mg.png" /></figure><p><em>Initialization</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9VBMpT-woP4T_ojn9I6Xsg.png" /></figure><p><em>Summarization</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*DZjpmpeekNwHpVupKblvJw.png" /></figure><p>So I think now you get a better idea about Variable types in Javascript.😊🤞</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb0d009b08d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Primitive and Reference Data types]]></title>
            <link>https://medium.com/@hirunisew99/primitive-and-reference-data-types-02c17cef3903?source=rss-90ae1dbf8f86------2</link>
            <guid isPermaLink="false">https://medium.com/p/02c17cef3903</guid>
            <dc:creator><![CDATA[Hiruni Sewwandi]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 08:32:55 GMT</pubDate>
            <atom:updated>2023-12-01T08:32:55.481Z</atom:updated>
            <content:encoded><![CDATA[<p>You know In JavaScript, a variable may store two types of values, 👀</p><p>They are</p><ul><li><strong>Primitive values</strong></li><li><strong>Reference Values</strong></li></ul><p>Let’s see what are they …… 😊🤷‍♂️</p><p>First, we take a look at what the primitive values are….🤞</p><h3>Primitive values</h3><p>There are six types of primitive values in javascript. Let’s see what they are ….</p><h3>Number</h3><p>Numbers represent numeric values, both integers and floating-point numbers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*ehdaLlKbMg-mtD9SLvCP5Q.png" /></figure><h3>String</h3><p>Strings represent text and are enclosed in either single (‘’) or double (“”) quotes. They are used for storing and manipulating textual data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*oyYB40NeCUPs8H82vItlNg.png" /></figure><h3>Boolean</h3><p>Booleans have only two possible values true and false. They are used to represent logical values and are essential for making decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*wt-YPvjToJ8uxGNdxyrtiw.png" /></figure><h3>Undefined</h3><p>Undefined is a special value that represents the absence of a value. It is often used as the default value of variables or function parameters that have not been assigned a value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*a1mR2FMz_RJZcmgEcr8PQA.png" /></figure><h3>Null</h3><p>null represents the intentional absence of any object value. It is often used when you want to indicate that a variable should have no value or that an object property is intentionally empty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*pKavhXXED8LfSoHBSZTuGw.png" /></figure><h3>Symbol</h3><p>Symbols are unique and immutable values introduced in ECMAScript 2015 (ES6). They are often used as property keys in objects to avoid naming conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*EqPXsz9KV4cIi1BlOOODAw.png" /></figure><p>Keep this mind 😊👀</p><p>Primitive values are fundamental values that are immutable, it means you know they cannot be altered once they are created.</p><p>Primitive types are stored directly in memory and have a fixed size.</p><p>When we assign a variable that stores a primitive value to another, the value stored in the variable is created and copied into the new variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*rCIjxxTveHcP7E9x8vmTCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*VfLyuOShe5KoJ0yX1A5erA.png" /></figure><p>Now let’s see what the reference values are…..😊👀</p><h3>Reference Values</h3><p>JavaScript provides three types of Reference values. They are as follows.</p><h3>Array</h3><p>Arrays are ordered collections of values, indexed by integers.</p><p>They are used for storing and manipulating lists of data.</p><p>Let’s see an example of arrays 🤔</p><p>let fruits = [“apple”, “banana”, “orange”];</p><p>console.log(fruits);</p><p>// output: [“apple”, “banana”, “orange”]</p><h3>Object</h3><p>They are collections of key-value pairs, where keys are strings, and values can be of any data type, including other objects.</p><p>They do not have a fixed size.</p><p>Objects can represent complex data structures and are used for modeling real-world entities.</p><p>Let’s see an example of Objects 🤔</p><p>let person = {</p><p>name: “John”,</p><p>age: 30</p><p>};</p><p>console.log(person);</p><p>// output: {name: “John”, age: 30}</p><p>The last reference value is functions.</p><h3>Function</h3><p>They are objects that can be invoked and passed around as arguments to other functions.</p><p>Functions are used for encapsulating reusable code and implementing logic in JavaScript programs.</p><p>Let’s see an example of Functions 🤔</p><p>let x = myFunction(4, 3);</p><p>function myFunction(a, b) {</p><p>// Function returns the product of a and b</p><p>return a * b;</p><p>}</p><p>You know that Unlike primitives, reference data types are mutable, meaning their contents can be changed after they are created.</p><p>Thus, variables that are reference values are <strong>accessed by reference</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*eJEldB00t3HxJnIdCogbtg.png" /></figure><p>So I think now you get a better understanding of the primitive and reference data types.😊🤞</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02c17cef3903" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>