<?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 Bettyokoloe on Medium]]></title>
        <description><![CDATA[Stories by Bettyokoloe on Medium]]></description>
        <link>https://medium.com/@bettyokoloe?source=rss-0c7fbeab0043------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Bettyokoloe on Medium</title>
            <link>https://medium.com/@bettyokoloe?source=rss-0c7fbeab0043------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 03:08:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bettyokoloe/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[Differences between var, let and const.]]></title>
            <link>https://medium.com/@bettyokoloe/differences-between-var-let-and-const-66aeb16c4347?source=rss-0c7fbeab0043------2</link>
            <guid isPermaLink="false">https://medium.com/p/66aeb16c4347</guid>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Bettyokoloe]]></dc:creator>
            <pubDate>Thu, 26 Mar 2026 17:00:11 GMT</pubDate>
            <atom:updated>2026-03-26T17:02:42.826Z</atom:updated>
            <content:encoded><![CDATA[<h2>Difference between var, let and const</h2><p>1. Re-assignments: var can be updated and re-declared in the same scope. Let can be updated, but not re-declared in the same scope. Const cannot be updated or re-declared in the same scope and must be initialized at declaration.</p><p>2. Scope: Var is function-scoped or global-scoped. Let and Const are block-scoped but limited to where they are defined.</p><p>3. Re-declaration: Var can be re-declared within the same scope without error. Let and Const cannot be re-declared within the same scope.</p><p>4. Hoisting: Var is hoisted to the top of its scope and initialized with undefined. Let and Const can be hoisted but not initialized. Also accessing it before declaration results in a reference error.</p><p>5. Global object: var creates a property on the global object when declared in the global scope. Let and Const do not create a property on the global object.</p><p>6. Initialization: Var and Let be declared without initialization e.g. var x; Const Must be initialized during declaration e.g. const x = 1;</p><p>Examples:</p><ol><li>. Re-assignment:</li></ol><p>· For var</p><p>var x = 10;</p><p>var x = 20; // Re-declaration allowed</p><p>x = 30; // Update allowed</p><p>console.log(x); // Output: 30</p><p>· For let</p><p>let y = 10;</p><p>// let y = 20; // Re-declaration NOT allowed</p><p>y = 25; // Update allowed</p><p>console.log(y); // Output: 25</p><p>· For const</p><p>const z = 10;</p><p>// z = 20; // Re-assignment NOT allowed</p><p>console.log(z); // Output: 10</p><p>2. Scope:</p><p>if (true) {</p><p>. var a = 1;</p><p>. let b = 2;</p><p>. const c = 3;</p><p>}</p><p>console.log(a); //Output: 1</p><p>// console.log(b); // Error</p><p>// console.log(c); // Error</p><p>3. Initialization: The formats for declaring are</p><p>Var x;</p><p>Let x;</p><p>Const x = 1;</p><p>Task By Ebere Omeje.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66aeb16c4347" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>