<?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>Forem: Ankit Tiwari</title>
    <description>The latest articles on Forem by Ankit Tiwari (@anku).</description>
    <link>https://forem.com/anku</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%2F25224%2Fb0a64f5b-5295-454b-af16-b8e354486c81.png</url>
      <title>Forem: Ankit Tiwari</title>
      <link>https://forem.com/anku</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anku"/>
    <language>en</language>
    <item>
      <title>MLH Fellowship: A Life-Changing Experience</title>
      <dc:creator>Ankit Tiwari</dc:creator>
      <pubDate>Mon, 24 Aug 2020 14:53:28 +0000</pubDate>
      <link>https://forem.com/anku/mlh-fellowship-a-life-changing-experience-3ia2</link>
      <guid>https://forem.com/anku/mlh-fellowship-a-life-changing-experience-3ia2</guid>
      <description>&lt;h1&gt;
  
  
  What is MLH Fellowship
&lt;/h1&gt;

&lt;p&gt;According to MLH:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The MLH Fellowship is a 12-week internship alternative for aspiring software engineers. Our programs pair fun, educational curriculum with practical experience that you can put on your resume right away. It's collaborative, remote, and happens under the guidance of expert mentors.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The MLH Fellowship in my opinion is an unmatched experience. I like to think of it as good parts of tech internships, open-source, and mentorship. It is highly focused on the learning of fellows and the contributions to the project is only a bi-product of it. &lt;/p&gt;

&lt;h1&gt;
  
  
  Why I got In
&lt;/h1&gt;

&lt;p&gt;I can’t be grateful enough for the open-source community.  More than 50% of the tools I use daily are free and open source. Every framework, every library I use to build something was given to me just for free. &lt;/p&gt;

&lt;p&gt;I have always wanted to contribute to open source since I joined this community. The number of things we get for free is unimaginable in any other industry. I also wanted to give back to this community which has given me so much. &lt;/p&gt;

&lt;p&gt;The MLH Fellowship was a perfect opportunity to take my open source contributions to the next level under the guidance of a professional mentor.&lt;/p&gt;

&lt;h1&gt;
  
  
  First week in the fellowship
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Vp48UScK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1qtfcmwfgax9krgjfc2m.jpeg" class="article-body-image-wrapper"&gt;&lt;img width="400" alt="Reactive Sea-Son Team Logo" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Vp48UScK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1qtfcmwfgax9krgjfc2m.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;center&gt;&lt;em&gt;My Pod Reactive Sea-son's Logo (Credit: &lt;a href="https://twitter.com/kush_kunal"&gt;Kunal Kushwaha&lt;/a&gt;)&lt;/em&gt;&lt;/center&gt;

&lt;p&gt;In the first week of the fellowship, I met some of the best people in my life (my pod mates and my mentor). I was part of the most OP Pod Reactive Sea-Son.  It is a great &lt;/p&gt;

&lt;p&gt;In the first week of the fellowship, I was placed in a pod with 10 awesome people including my mentor &lt;a href="https://twitter.com/jevakallio"&gt;Jani Eväkallio&lt;/a&gt;. We named our pod Reactive Sea-Son which is the most OP Pod in the fellowship.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SDrJ21bv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ojhnqzr1g7wovfgfg67a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SDrJ21bv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ojhnqzr1g7wovfgfg67a.png" alt="Fellowship Kick-off zoom call"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;center&gt;&lt;em&gt;A screenshot of the MLH Fellowship kickoff call&lt;/em&gt;&lt;/center&gt;
&lt;h3&gt;
  
  
  The Orientation Hacktathon
&lt;/h3&gt;

&lt;p&gt;In the first week, MLH organized an orientation hackathon where I hacked on a project called &lt;a href="https://devpost.com/software/executely"&gt;executely&lt;/a&gt; along with my pod mates &lt;a href="https://twitter.com/sauravmh"&gt;Saurav&lt;/a&gt; and &lt;a href="https://twitter.com/yash_kr_verma"&gt;Yash&lt;/a&gt;. Our project won the first prize across all the pods. The best part of it was everyone getting a mug with our team logo. This mug will be a reminder of the great experiences we shared together. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eco3UaBP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6nqijrz43q1pn7hap7o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eco3UaBP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/j6nqijrz43q1pn7hap7o.jpg" alt="Eloquent Javascript book and MLH swag"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;center&gt;&lt;em&gt;Hackathon prize&lt;/em&gt;&lt;/center&gt;
&lt;h1&gt;
  
  
  My Project
&lt;/h1&gt;

&lt;p&gt;During the fellowship, I along with my team contributed to &lt;a href="https://github.com/facebook/react-native"&gt;react-native&lt;/a&gt;. We redesigned and revamped the RNTester app which is used in CI to test any changes to react-native. It is also a showcase app for all the features react-native provides. The RNTester team was probably the largest team in the fellowship working on a single project and we learned about so many best practices while working in a team.&lt;/p&gt;

&lt;p&gt;react-native was new for me and working with RNTester had its own set of challenges but our project maintainer &lt;a href="https://twitter.com/rickhanlonii"&gt;Ricky&lt;/a&gt; and pod mentor&lt;a href="https://twitter.com/jevakallio"&gt;Jani Eväkallio&lt;/a&gt; provided us an enormous amount of help and support to make this real.&lt;/p&gt;

&lt;h1&gt;
  
  
  My Learnings
&lt;/h1&gt;

&lt;p&gt;When I first visited the official MLH website it said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Spend 12 weeks leveling up your software engineering skills by contributing to the Open Source software the world depends on.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And initially, I thought it will &lt;strong&gt;all&lt;/strong&gt; be about leveling up my software engineering skills and I found myself guilty of thinking in terms of issues, code, and PRs. &lt;/p&gt;

&lt;p&gt;But later I realized that the skills we can learn here go way more beyond than “hard engineering skills”.  Most of the things I learned in this fellowship were from the retrospectives, round-table discussions and show and tells. MLH also organized a large number of talks and educational events which were really great.&lt;/p&gt;

&lt;p&gt;I also learned to play &lt;a href="https://skribbl.io/"&gt;Skribble&lt;/a&gt; during the fellowship. Playing Skribble with my pod mates was one of the best moments of this fellowship.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9sw7ILi_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ov2v9gu5rld42o5is3zo.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9sw7ILi_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ov2v9gu5rld42o5is3zo.jpeg" alt="Screenshot of a Skribble session"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;center&gt;&lt;em&gt;A screenshot of a Skribble session with our Mentor &lt;a href="https://twitter.com/jevakallio"&gt;Jani Eväkallio&lt;/a&gt;&lt;/em&gt;&lt;/center&gt;
&lt;h1&gt;
  
  
  My Mentor
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://twitter.com/jevakallio"&gt;Jani Eväkallio&lt;/a&gt; was my pod's mentor and he is the best mentor one could ever ask for. He was always there for everyone. He offered us all kinds of support we ever needed both inside and outside the fellowship. The fellowship experience would never be the same without him. &lt;/p&gt;

&lt;p&gt;There is one story I like to share with anyone who asks - "what kind of support you can expect from mentors at MLH?". &lt;/p&gt;

&lt;p&gt;Once, Jani had his calendar full (with meetings) for the day and he had exactly 15 mins of break time. I asked him if he was free and if we could get on a call for 15 minutes regarding my project and without any hesitation he offered the only break time he had. Thank you Jani ❤️&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Words
&lt;/h1&gt;

&lt;p&gt;This Fellowship is an unforgettable experience for me. The support, respect, and love I got from my pod mates and mentor is something you don't get often. Thank you to all of my pod mates for making it such a memorable experience ❤️&lt;/p&gt;

&lt;p&gt;Thank you Team MLH for all of the hard work you did. It was well planned and perfectly executed.&lt;/p&gt;

&lt;p&gt;If you are interested, the MLH Fellowship is back again. Read more about it &lt;a href="https://fellowship.mlh.io/"&gt;here&lt;/a&gt;. Feel free to reach out to me on &lt;a href="https://twitter.com/__anku__"&gt;twitter&lt;/a&gt; for any questions regarding the fellowship. We also did a live-stream sharing our experiences. You can check that out &lt;a href="https://www.youtube.com/watch?v=iSMlT91al8Q"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Thank you for reading it.&lt;/p&gt;

</description>
      <category>mlhgrad</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Are let and const hoisted?</title>
      <dc:creator>Ankit Tiwari</dc:creator>
      <pubDate>Wed, 22 Jul 2020 07:35:28 +0000</pubDate>
      <link>https://forem.com/anku/are-let-and-const-hoisted-4kbi</link>
      <guid>https://forem.com/anku/are-let-and-const-hoisted-4kbi</guid>
      <description>&lt;p&gt;In this post, I will be talking about hoisting, temporal dead zone, and how hoisting works with let and const.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is hoisting?
&lt;/h2&gt;

&lt;p&gt;The JavaScript engine before parses the code before executing and during the parsing phase it shifts all the &lt;strong&gt;variable declaration&lt;/strong&gt; to the top of the scope. This behavior of the JS engine is called &lt;strong&gt;hoisting&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Variable Hoisting
&lt;/h3&gt;

&lt;p&gt;Consider the following code snippet -&lt;br&gt;
&lt;/p&gt;

&lt;div class="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="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can see that the &lt;code&gt;greeting&lt;/code&gt; variable can be accessed before its declared. This happens because the JS engine modifies our code snippet into something like this -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;greeting&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Function Hoisting
&lt;/h3&gt;

&lt;p&gt;The formal function declarations in JavaScript are also hoisted to the top of the scope. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// Hello&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;greeting&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The important distinction between &lt;strong&gt;variable hoisting&lt;/strong&gt; and &lt;strong&gt;function hoisting&lt;/strong&gt; is that a &lt;code&gt;var&lt;/code&gt; variable is hoisted and then auto-initialized to &lt;code&gt;undefined&lt;/code&gt; whereas a function declaration is hoisted and &lt;strong&gt;initialized to its function value&lt;/strong&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  Function declaration vs Function expression
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Function hoisting&lt;/em&gt; only applies to formal &lt;code&gt;function&lt;/code&gt; declarations and not to &lt;code&gt;function&lt;/code&gt; expression assignments. Consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// TypeError: greeting is not a function&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;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;greeting&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello!&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;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Above, we can see that the &lt;code&gt;greeting&lt;/code&gt; variable was hoisted but it was not initialized with the function reference. The engine throws us a &lt;code&gt;TypeError: greeting is not a function&lt;/code&gt; and not &lt;code&gt;ReferenceError: greeting is not defined&lt;/code&gt;. The function expression assignments behave very much like &lt;strong&gt;variable hoisting&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about let and const?
&lt;/h2&gt;

&lt;p&gt;So far, I have only talked about &lt;code&gt;var&lt;/code&gt; and formal &lt;code&gt;function&lt;/code&gt; declarations. What about the &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;. Let's see the following code snippet -&lt;br&gt;
&lt;/p&gt;

&lt;div class="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="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// cannot access 'greeting' before initialization&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We get a new kind of error, its not a &lt;code&gt;ReferenceError&lt;/code&gt;, the engine knows about &lt;code&gt;greeting&lt;/code&gt; but doesn't allow us to use it before its initialized. The JS engine doesn't allow us to access the variables declared with &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; before they are declared. This is called &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's consider this snippet -&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;greeting&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined&lt;/span&gt;

&lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Above, we can see that we are able to access the &lt;code&gt;greeting&lt;/code&gt; variable as soon as it was declared.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, let and const are not hoisted?
&lt;/h2&gt;

&lt;p&gt;After seeing the above two code snippets, I was pretty convinced too that &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; are not hoisted. But they actually are. We can prove this with the help of a few more examples -&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;iDontExist&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// undefined&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;greeting&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// cannot access 'greeting' before initialization&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If the &lt;code&gt;greeting&lt;/code&gt; variable was not hoisted, we would expect &lt;code&gt;typeof greeting&lt;/code&gt; to be &lt;code&gt;undefined&lt;/code&gt; similar to &lt;code&gt;typeof iDontExist&lt;/code&gt;. This proves that the JS engine knows about our &lt;code&gt;greeting&lt;/code&gt; variable but still doesn't allow us to access it just yet due to &lt;strong&gt;Temporal Dead Zone&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's see another example -&lt;br&gt;
&lt;/p&gt;

&lt;div class="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;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;outer value&lt;/span&gt;&lt;span class="dl"&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// outer value&lt;/span&gt;

 &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// start TDZ for x&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;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// cannot access 'x' before initialization&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;inner value&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// declaration ends TDZ for x&lt;/span&gt;
 &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Accessing the variable &lt;code&gt;x&lt;/code&gt; in the inner scope still causes the TDZ error. If the &lt;code&gt;let x = 'inner value';&lt;/code&gt; was not hoisted then on line 6, it would have logged &lt;code&gt;outer value&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;var&lt;/code&gt; declarations are hoisted and initialized with &lt;code&gt;undefined&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The formal function declarations are hoisted and initialized with their function reference.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; variables are hoisted too but they cannot be accessed before their declarations. This is called Temporal Dead Zone.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>es6</category>
    </item>
    <item>
      <title>Getting Started With ES6 Modules</title>
      <dc:creator>Ankit Tiwari</dc:creator>
      <pubDate>Tue, 23 Oct 2018 18:51:36 +0000</pubDate>
      <link>https://forem.com/anku/getting-started-with-es6-modules-7bk</link>
      <guid>https://forem.com/anku/getting-started-with-es6-modules-7bk</guid>
      <description>&lt;p&gt;A Module is simply a javascript file with a bunch of variables or functions which can be imported and used in other javascript files. With ES6, working with modules has become fun. Let me tell you how.&lt;/p&gt;

&lt;p&gt;Before ES6 Modules, we used to have &lt;code&gt;script&lt;/code&gt; tags in our &lt;code&gt;html&lt;/code&gt; file to import and use a library. Let's see the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- index.html --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Before ES6 Modules&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"./app.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app.js&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uniqNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uniq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// _.uniq is coming from lodash&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;uniqNumbers&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// [1, 2, 3, 4]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Above, we are including &lt;code&gt;lodash&lt;/code&gt; in the &lt;code&gt;index.html&lt;/code&gt; file. And we are using &lt;code&gt;uniq&lt;/code&gt; function provided by &lt;code&gt;lodash&lt;/code&gt; to find the unique numbers. Here, the &lt;code&gt;_&lt;/code&gt; was not defined explicitly and someone looking at only the &lt;code&gt;app.js&lt;/code&gt; file would have no idea from where the &lt;code&gt;_&lt;/code&gt; is coming from. So, is there a better way to do it? Well, yeah!&lt;/p&gt;

&lt;h3&gt;
  
  
  NPM - Node Package Manager
&lt;/h3&gt;

&lt;p&gt;NPM is where all the javascript libraries are hosted. If you ever want to use one, you would have to install it from here. You must have &lt;a href="https://nodejs.org/en/"&gt;NodeJS&lt;/a&gt; installed in your system to use it. NPM comes with NodeJS.&lt;/p&gt;

&lt;p&gt;Let's create a directory called &lt;code&gt;es6Modules&lt;/code&gt; and &lt;code&gt;cd&lt;/code&gt; into it. Create an &lt;code&gt;index.html&lt;/code&gt; and an &lt;code&gt;app.js&lt;/code&gt; file inside the directory.&lt;br&gt;
Now, run the command &lt;code&gt;npm init&lt;/code&gt; in your terminal inside this directory. It will ask a few questions about your project. After answering all the project related questions. It will generate a &lt;code&gt;package.json&lt;/code&gt; file which contains the details about your project and also the libraries that you have installed from npm.&lt;/p&gt;

&lt;p&gt;The directory structure would look something like below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;├── app.js
├── index.html
└── package.json
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;To install a package from NPM, you just have to type the command &lt;code&gt;npm install &amp;lt;package-name&amp;gt;&lt;/code&gt; in your terminal.&lt;br&gt;
For installing &lt;code&gt;lodash&lt;/code&gt;, it would be &lt;code&gt;npm install lodash&lt;/code&gt;. After running this command, you will see a folder called &lt;code&gt;node_modules&lt;/code&gt; appear in your directory. It will contain all the libraries or packages that you have installed. Also, in your &lt;code&gt;package.json&lt;/code&gt; file, &lt;code&gt;lodash&lt;/code&gt; will be added to the dependencies section.&lt;/p&gt;

&lt;p&gt;Now, that &lt;code&gt;lodash&lt;/code&gt; is installed. Let's use it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// this is how you import an es6 module&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;uniqNumbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;uniq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&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="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;uniqNumbers&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, let's reference &lt;code&gt;app.js&lt;/code&gt; file in the &lt;code&gt;index.html&lt;/code&gt; to run it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- index.html --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;ES6 Modules&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"./app.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, open the &lt;code&gt;index.html&lt;/code&gt; file in the browser and check your console. Instead of seeing the unique Numbers, you are seeing an error something like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1yq2HHJv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/pht0cxvj8dzirz2r4huf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1yq2HHJv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/pht0cxvj8dzirz2r4huf.png"&gt;&lt;/a&gt;&lt;br&gt;ES6 Modules are not supported in browsers
  &lt;/p&gt;

&lt;p&gt;Well, it turns out that browsers don't support ES6 Modules just yet. But that doesn't mean we can't use it. We can use package bundlers like webpack or parcel to compile our ES6 Modules syntax to something that our browsers understand.&lt;/p&gt;

&lt;p&gt;For this tutorial, I am going to use webpack. To install webpack execute the command given below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install webpack webpack-cli --save-dev&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now, create a &lt;code&gt;webpack.config.js&lt;/code&gt; file in your root directory to configure webpack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// webpack.config.js&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// entry point of our project&lt;/span&gt;
  &lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;bundle.js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// The name of the output file&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dist&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// The folder where output file will be generated&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now, we need to add a script to our &lt;code&gt;package.json&lt;/code&gt; file to run webpack and bundle our code. Open up &lt;code&gt;package.json&lt;/code&gt; file and a script as given below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;package.json&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"build"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"webpack --config webpack.config.js"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;--config&lt;/code&gt; is used to specify our configuration file &lt;code&gt;webpack.config.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, run the build script by running &lt;code&gt;npm run build&lt;/code&gt; in your terminal. After running this script, you will see that webpack has generated a file called &lt;code&gt;bundle.js&lt;/code&gt; inside &lt;code&gt;dist&lt;/code&gt; folder.&lt;br&gt;
This file contains the code that we have written in  &lt;code&gt;app.js&lt;/code&gt; but in way that our browsers will understand. So, we now have to reference this file in &lt;code&gt;index.html&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="c"&gt;&amp;lt;!-- index.html --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;ES6 Modules&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"./dist/bundle.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;If you open the &lt;code&gt;index.html&lt;/code&gt; file in your browser, you will see the unique Numbers as below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v-7YBc0F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lh4k8j3l4td6f17lds67.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v-7YBc0F--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/lh4k8j3l4td6f17lds67.png"&gt;&lt;/a&gt;&lt;br&gt;Bundled code by webpack works fine in the browser
  &lt;/p&gt;

&lt;p&gt;This is all for this post. In the next post, I will talk about writing and using our own ES6 Modules. Until then read the documentation of &lt;a href="https://webpack.js.org/guides/"&gt;webpack&lt;/a&gt; to learn more about all the awesome things it does.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webpack</category>
    </item>
    <item>
      <title>Project Ideas for a Hackathon (Going for the first time)</title>
      <dc:creator>Ankit Tiwari</dc:creator>
      <pubDate>Mon, 02 Apr 2018 03:07:04 +0000</pubDate>
      <link>https://forem.com/anku/project-ideas-for-a-hackathon-going-for-the-first-time-g9n</link>
      <guid>https://forem.com/anku/project-ideas-for-a-hackathon-going-for-the-first-time-g9n</guid>
      <description>&lt;p&gt;I am a CSE sophomore in India. There is a &lt;a href="https://angelhack-delhi-2018.eventbrite.com/"&gt;hackathon being organized by AngelHack&lt;/a&gt; next month in which I want to participate. &lt;/p&gt;

&lt;p&gt;They are asking us to build something that solves a social or environmental problem and positively impacts our local community.&lt;/p&gt;

&lt;p&gt;I will be going to the hackathon with 2 of my friends. I have experience in MERN stack (1 year), one guy knows ML (doesn't have a lot of experience) and the other has done Frontend work.&lt;/p&gt;

&lt;p&gt;We are ready to learn new things (that's the goal) if our project requires us to. As it is our first ever hackathon so we are not sure what to build. &lt;/p&gt;

&lt;p&gt;It would be a great help if you guys can give us some suggestions. Thanks.&lt;/p&gt;

</description>
      <category>help</category>
    </item>
  </channel>
</rss>
