<?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: Gaurav-Shekhawat</title>
    <description>The latest articles on DEV Community by Gaurav-Shekhawat (@gauravshekhawat).</description>
    <link>https://dev.to/gauravshekhawat</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%2F685933%2F0bce01d5-cb6d-4132-a994-c345c4e64ce5.png</url>
      <title>DEV Community: Gaurav-Shekhawat</title>
      <link>https://dev.to/gauravshekhawat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gauravshekhawat"/>
    <language>en</language>
    <item>
      <title>Day 11 : Revision day, going through the topics I learnt in more detail</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Tue, 24 Aug 2021 15:11:01 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-11-revision-day-going-through-the-topics-i-learnt-in-more-detail-40ae</link>
      <guid>https://dev.to/gauravshekhawat/day-11-revision-day-going-through-the-topics-i-learnt-in-more-detail-40ae</guid>
      <description>&lt;p&gt;After being overloaded by information in the past 10 days, I felt the need to stop and give myself time to absorb the material I have been through.&lt;/p&gt;

&lt;p&gt;So, no new content for today, enjoy.....&lt;/p&gt;

</description>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 10 : Understanding DOM and debugging was never so easy</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Mon, 23 Aug 2021 13:45:22 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-10-links-to-important-things-i-learnt-today-3bbo</link>
      <guid>https://dev.to/gauravshekhawat/day-10-links-to-important-things-i-learnt-today-3bbo</guid>
      <description>&lt;p&gt;I am summarising everything that I have learnt today. If you also want to go through the same topic, I believe the article links I am providing is one of the best on the web available for that topic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DOM tree basics :- &lt;a href="https://javascript.info/dom-nodes#an-example-of-the-dom"&gt;java-script-info&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;The essential guide to javascript Iterators (the for-of loop guide) :- &lt;a href="https://www.javascripttutorial.net/es6/javascript-iterator/"&gt;javascriptutorial.net&lt;/a&gt; 
and &lt;a href="https://www.educative.io/courses/step-up-your-js-a-comprehensive-guide-to-intermediate-javascript/m27Yx11KPMG"&gt;Educative&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Walking through the DOM :- &lt;a href="https://javascript.info/dom-navigation#the-sibling-question"&gt;javascript-info&lt;/a&gt; . In this article, you may feel some problem at the last with the table properties. Just see the properties being used in the example, ignore others (we will search for them whenever needed, as we know what to search for).&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Searching element in DOM :- &lt;a href="https://javascript.info/searching-elements-dom"&gt;javascript-info&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Debugging javascript using chrome developer tools :-  &lt;a href="https://developer.chrome.com/docs/devtools/javascript/"&gt;Google&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;ul&gt;
&lt;li&gt;Best guide to debugging javascript for beginners I could find - &lt;a href="https://javascript.info/debugging-chrome#the-sources-panel"&gt;link&lt;/a&gt; . In this everything is explained in a much simpler language.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 9 : addEventListener('click', ..) and .onclick are not the same</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Sun, 22 Aug 2021 06:38:13 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-9-quick-look-at-some-js-points-you-may-have-missed-43jp</link>
      <guid>https://dev.to/gauravshekhawat/day-9-quick-look-at-some-js-points-you-may-have-missed-43jp</guid>
      <description>&lt;p&gt;so, this is different from previous posts. The past week was the first week of me posting any article on the web. Even after not writing everything in detailed form, the response I got was beyond my expectations. From now on, I will try my best to cover everything in detail.. &lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;code&gt;addEventListener('click', ....)&lt;/code&gt; and &lt;code&gt;.onclick&lt;/code&gt; are not the same
&lt;/h2&gt;

&lt;p&gt;Yes, they are not the same. The difference being that in the  &lt;code&gt;addEventListener&lt;/code&gt; , we can add multiple listeners to the same event. While the &lt;code&gt;onclick&lt;/code&gt; "overrides" the previous &lt;code&gt;onclick&lt;/code&gt; attached to the same event. &lt;/p&gt;

&lt;p&gt;For example:- see the below codepen &lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/grvskwt/embed/RwgbjaO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;As a result, in the console:&lt;br&gt;
When we click the onClick Button, only &lt;code&gt;I’m also clicked!&lt;/code&gt; is logged out&lt;br&gt;
When we click the addEventListner Button, both &lt;code&gt;I’m clicked!&lt;/code&gt; and &lt;code&gt;I’m also clicked!&lt;/code&gt; are logged out&lt;/p&gt;

&lt;p&gt;To conclude, although we can attach the same event with different syntax, using addEventListener(‘click’, …) we can have multiple listeners on one event, whereas using onclick we can only assign one listener to one event (which is always the latest assigned listener).&lt;/p&gt;

&lt;p&gt;Please open the above codepen through "edit in codepen" and then see the outputs in the console. I have added enough comments to make you understand everything. In case of any doubt, please do comment.&lt;/p&gt;

&lt;p&gt;The full reference about the above point can be found at &lt;a href="https://medium.com/@ysmiracle/use-addeventlistener-instead-of-onclick-oninput-onchange-especially-when-working-in-teams-50ad40badb8d"&gt;Medium&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 8 : Learning JS fundamentals, Part -3</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Sat, 21 Aug 2021 10:42:32 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-8-learning-js-fundamentals-part-3-2b56</link>
      <guid>https://dev.to/gauravshekhawat/day-8-learning-js-fundamentals-part-3-2b56</guid>
      <description>&lt;h2&gt;
  
  
  Closures
&lt;/h2&gt;

&lt;p&gt;Closure is when a function "remembers" the variables outside of it, even if you pass that function elsewhere.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function makeAdder(x) {
  return function(y) {
    return x + y;
  };
}

var add5 = makeAdder(5);
var add10 = makeAdder(10);

console.log(add5(2));  // 7
console.log(add10(2)); // 12
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The full reference can be found on - &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures" rel="noopener noreferrer"&gt;MDN&lt;/a&gt;&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%2Fuploads%2Farticles%2F6r6b2ywc2b9y1yed6hu2.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%2Fuploads%2Farticles%2F6r6b2ywc2b9y1yed6hu2.png" alt="Alt Tefxt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, the variable question will remian alive, even after 100ms of execution of parent function. &lt;/p&gt;

&lt;p&gt;Example - 2&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%2Fuploads%2Farticles%2Fawfe3zzlkw1hc4twnxht.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%2Fuploads%2Farticles%2Fawfe3zzlkw1hc4twnxht.png" alt="Alt Tdext"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, the function &lt;code&gt;holdYourQuestion&lt;/code&gt; will remember the question, even if it is called at an entire different time on an entire differnet place. &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;this&lt;/code&gt; keyword
&lt;/h2&gt;

&lt;p&gt;It is all about the call, it is not the definition of the function, it is not where the function is, none of that matters, it is only how the function was called that determines where the &lt;code&gt;this&lt;/code&gt; keyword will be pointing to.&lt;/p&gt;

&lt;p&gt;A this-aware function can thus have a different context each time it's called, which makes it more flexible &amp;amp; reusable.&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%2Fuploads%2Farticles%2Fmza6wsicivo4v7jf486d.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%2Fuploads%2Farticles%2Fmza6wsicivo4v7jf486d.png" alt="Alt Texft"&gt;&lt;/a&gt;&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%2Fuploads%2Farticles%2Foms0c5y4apangqmpfxdq.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%2Fuploads%2Farticles%2Foms0c5y4apangqmpfxdq.png" alt="Alt dText"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  DOUBT
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Prototypes in js
&lt;/h2&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 8 : Learning JS Fundamentals, Part-2</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Sat, 21 Aug 2021 08:39:43 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-8-learning-js-fundamentals-part-2-4nll</link>
      <guid>https://dev.to/gauravshekhawat/day-8-learning-js-fundamentals-part-2-4nll</guid>
      <description>&lt;p&gt;see the below example:-&lt;br&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%2Fuploads%2Farticles%2Fjv0jewumo2h8aq7f1ui2.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%2Fuploads%2Farticles%2Fjv0jewumo2h8aq7f1ui2.png" alt="Alt Example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the function above, we have not declared the variables teacher and topic, still we assigned them values. When we call this function, this changes the value of the "teacher" variable present in the global , while the topic will be declared as a new variable in the global scope, hence the output of the last line will be "React".&lt;/p&gt;




&lt;h3&gt;
  
  
  Undefined vs Undeclared
&lt;/h3&gt;

&lt;p&gt;clear from the name...&lt;/p&gt;




&lt;h3&gt;
  
  
  function expressions
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function" rel="noopener noreferrer"&gt;Function expression&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions" rel="noopener noreferrer"&gt;Arrow function Expressions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;just skim through the above two articles starting paragrpahs. &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%2Fuploads%2Farticles%2Fqu3y7ktlxffjved93tkr.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%2Fuploads%2Farticles%2Fqu3y7ktlxffjved93tkr.png" alt="AimageText"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The  first function above is an example of anonymous function expression while the second is a named function expression.&lt;/p&gt;

&lt;p&gt;Example for arrow functions:-&lt;br&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%2Fuploads%2Farticles%2Fhgzzkeaodgkinr0x3t14.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%2Fuploads%2Farticles%2Fhgzzkeaodgkinr0x3t14.png" alt="Alt fdText"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Immediately invoked function expressions
&lt;/h3&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%2Fuploads%2Farticles%2Fmf07bg9uqbe222mkaqgs.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%2Fuploads%2Farticles%2Fmf07bg9uqbe222mkaqgs.png" alt="Als Texfdt"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These are used in places of our code where we need to collect a set of variables and protect them from encroaching upon an outer scope. These are not used nowadays, instead block scoping is used(with let).&lt;/p&gt;

&lt;h3&gt;
  
  
  Block scoping
&lt;/h3&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%2Fuploads%2Farticles%2F2519g4e1grj6me56gwhi.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%2Fuploads%2Farticles%2F2519g4e1grj6me56gwhi.png" alt="Alt Texft"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;In the below example, the variable &lt;code&gt;temp&lt;/code&gt; will be available only inside the &lt;code&gt;if&lt;/code&gt; block. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; are good, when you want to define a variable at a function level. (as the scope of var is global or the function in which it is defined).&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%2Fuploads%2Farticles%2Fx305lvvmlxvqyvojlff4.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%2Fuploads%2Farticles%2Fx305lvvmlxvqyvojlff4.png" alt="Alt Tefdxt"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>100daysofcode</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 8 : Learning JS</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Sat, 21 Aug 2021 07:00:27 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-8-learning-js-500</link>
      <guid>https://dev.to/gauravshekhawat/day-8-learning-js-500</guid>
      <description>&lt;h3&gt;
  
  
  Important point about objects in js
&lt;/h3&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%2Fuploads%2Farticles%2Fxo4196ni1ofw07mc9l3f.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%2Fuploads%2Farticles%2Fxo4196ni1ofw07mc9l3f.png" alt="js objects"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  3 and 3.0 ??
&lt;/h3&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%2Fuploads%2Farticles%2F1knw0z8enhkd8bpubm1q.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%2Fuploads%2Farticles%2F1knw0z8enhkd8bpubm1q.png" alt="Numbers in js"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you do &lt;code&gt;typeof(null)&lt;/code&gt; you will get the answer as &lt;code&gt;object&lt;/code&gt;. A bug maybe??  Arrays are also objects...(subtype of)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Why no () after &lt;code&gt;.length&lt;/code&gt; of an array in js ??
&lt;/h3&gt;

&lt;p&gt;Read this &lt;a href="https://stackoverflow.com/questions/9041723/why-no-after-length-in-javascript" rel="noopener noreferrer"&gt;stack-overflow&lt;/a&gt; post.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;shift()&lt;/code&gt; and &lt;code&gt;pop()&lt;/code&gt;.
&lt;/h3&gt;

&lt;p&gt;Both are used to take out elements from the array. shift() starts from the beginning while pop from the end.&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%2Fuploads%2Farticles%2Fl081fu98xg45r2567jgy.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%2Fuploads%2Farticles%2Fl081fu98xg45r2567jgy.png" alt="pic"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  for each loop in js
&lt;/h3&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%2Fuploads%2Farticles%2F7ynin62nx4yyv75u5djs.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%2Fuploads%2Farticles%2F7ynin62nx4yyv75u5djs.png" alt="for each in js"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See that we are using back-ticks within that &lt;code&gt;console.log()&lt;/code&gt; , it enables us to write variables inside the string using &lt;code&gt;${}&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;includes()&lt;/code&gt; function in js
&lt;/h3&gt;

&lt;p&gt;checks for substring for a string, or array values in case of an array and so on..&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%2Fuploads%2Farticles%2F0j5a2jub6j84lf4rvzw9.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%2Fuploads%2Farticles%2F0j5a2jub6j84lf4rvzw9.png" alt="includes in js"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  types in js
&lt;/h1&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%2Fuploads%2Farticles%2Fuyy5uwdv3sfx4si5tbyt.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%2Fuploads%2Farticles%2Fuyy5uwdv3sfx4si5tbyt.png" alt="A"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In js, variables don't have types, values do. &lt;br&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%2Fuploads%2Farticles%2Fa5g31hs2aepq42be3vqo.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%2Fuploads%2Farticles%2Fa5g31hs2aepq42be3vqo.png" alt="type of values"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In JS, if a variable has never been declared, or not assigned a value, it considers both as an "undefined" state.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var v;
typeof(v);   //undefined
typeof(w);   //undefined

hello = function(){};
typeof(hello);      //"function"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  NaN
&lt;/h3&gt;

&lt;p&gt;NaN is a special value that sort of indicates that we've had an invalid numberic operation of some sort.&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%2Fuploads%2Farticles%2Fk9lgqd5km1im7pimoprj.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%2Fuploads%2Farticles%2Fk9lgqd5km1im7pimoprj.png" alt="NaN"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;code&gt;new&lt;/code&gt; keyword in js
&lt;/h3&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%2Fuploads%2Farticles%2F7jr2ukoi36z40t5hsxdx.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%2Fuploads%2Farticles%2F7jr2ukoi36z40t5hsxdx.png" alt="pic of new objects"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the first example below, it is used to instantaite an object of date subtype, while in the second, we are doing type conversion into string&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%2Fuploads%2Farticles%2Fejk355istvyq5ugunhxb.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%2Fuploads%2Farticles%2Fejk355istvyq5ugunhxb.png" alt="String()"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence we can convert to string by two methods, first using that &lt;code&gt;String(num_variable)&lt;/code&gt; and second using &lt;code&gt;num_variable.toString()&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conversion of string to int
&lt;/h3&gt;

&lt;p&gt;follow this &lt;a href="https://stackoverflow.com/questions/1133770/how-to-convert-a-string-to-an-integer-in-javascript" rel="noopener noreferrer"&gt;link&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Falsy and Truthy in js
&lt;/h3&gt;

&lt;p&gt;Falsy implies the values, that will be considered as &lt;code&gt;false&lt;/code&gt;, if we try to convert or use then as boolean (using inside if or while statements).&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%2Fuploads%2Farticles%2F7ppia3d6sf79lbwlej9t.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%2Fuploads%2Farticles%2F7ppia3d6sf79lbwlej9t.png" alt="falsy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first value in the table is am empty string.&lt;/p&gt;

&lt;p&gt;All other remaining values are truthy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Double equals vs Triple Equals
&lt;/h3&gt;

&lt;p&gt;Double equals considers coersion, while triple equal don't. So, if both of our variables has the same type, then we can use any of these. &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%2Fuploads%2Farticles%2Fnuidhv50dltj9pb4htee.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%2Fuploads%2Farticles%2Fnuidhv50dltj9pb4htee.png" alt="null == undefined "&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>100daysofcode</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 7 : Deep diving into Django Routes</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Fri, 20 Aug 2021 18:20:08 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-7-deep-diving-into-django-routes-40k7</link>
      <guid>https://dev.to/gauravshekhawat/day-7-deep-diving-into-django-routes-40k7</guid>
      <description>&lt;p&gt;How to run your django server for the first time? Use the below command :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py runserver
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will give you the IP address telling where your web app is currently running.&lt;/p&gt;




&lt;p&gt;To create your very first app use:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py startapp hello
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, to install this app into our project, go to settigs.py in the main parent directory, inside that update the list of INSTALLED_APPS.  &lt;/p&gt;

&lt;p&gt;From now on, our focus will be on the &lt;code&gt;views.py&lt;/code&gt; file.&lt;/p&gt;




&lt;h2&gt;
  
  
  Implementing our Django app
&lt;/h2&gt;

&lt;p&gt;You can think of each view as something a user might want to see. So, first we create a default view. The function accepts (request) as its argument. The request represents the HTTP request which the user made in order to access our web server.  &lt;/p&gt;

&lt;p&gt;Now update the urls.py files. &lt;/p&gt;

</description>
      <category>django</category>
      <category>webdev</category>
      <category>100daysofcode</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 7 : Learning Django Fundamentals</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Thu, 19 Aug 2021 20:17:52 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-7-learning-django-fundamentals-3g7c</link>
      <guid>https://dev.to/gauravshekhawat/day-7-learning-django-fundamentals-3g7c</guid>
      <description>&lt;p&gt;Django is a python web programming framework, which allows us to dynamically generate HTML and CSS for the backend of our website. Django combines the static web pages created using HTML and CSS with the endless possibilites of the programming language python, leading us to built dynamic web applications.&lt;/p&gt;

&lt;p&gt;Django will allow us to write python code which will dynamically generate HTML and CSS.&lt;/p&gt;




&lt;h2&gt;
  
  
  HTTP
&lt;/h2&gt;

&lt;p&gt;It stands for Hyper-Text-Transfer-Protocol, which is the protocol for how messages are going to be sent back and forth over the internet.&lt;/p&gt;

&lt;p&gt;Example of a HTTP request method:-&lt;br&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%2Fuploads%2Farticles%2Fgn9oup1dzsmragfl6vj5.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%2Fuploads%2Farticles%2Fgn9oup1dzsmragfl6vj5.png" alt="Request method"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Get&lt;/code&gt; tells us that we want to get that particular page. &lt;code&gt;/&lt;/code&gt; simply indicates that we are requesting for the home page. &lt;code&gt;HTTP/1.1&lt;/code&gt; is the version of HTTP which we are using. &lt;code&gt;Host&lt;/code&gt; tells us what URL we are trying to access the web-page for.&lt;/p&gt;

&lt;p&gt;Example of an HTTP response:-&lt;br&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%2Fuploads%2Farticles%2Fckpzfvbc853pd63121ka.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%2Fuploads%2Farticles%2Fckpzfvbc853pd63121ka.png" alt="HTTP response"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  HTTP Status Codes:-
&lt;/h3&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%2Fuploads%2Farticles%2F630andf527ngsiub9fel.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%2Fuploads%2Farticles%2F630andf527ngsiub9fel.png" alt="Status codes http"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Starting an Django Project
&lt;/h2&gt;

&lt;p&gt;To start a django project in the current directory, run this command:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject project_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The short intro to some starter files made by Django is given below:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;manage.py&lt;/code&gt; :- We will use this file to be able to execute commands on this django project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;settings.py&lt;/code&gt; :- If we want to change some settings to add features to our application or make modifications to how our application behaves. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;urls.py&lt;/code&gt; :- This is the table of contents of all the urls on our web applications which ulitmately a user can visit.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>webdev</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Day 6: 100 days of code, Learning Bootstrap fundamentals and sass inheritance</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Wed, 18 Aug 2021 20:08:23 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-6-100-days-of-code-4fob</link>
      <guid>https://dev.to/gauravshekhawat/day-6-100-days-of-code-4fob</guid>
      <description>&lt;p&gt;There will be less content today as I am busy with academics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't forget to use the &lt;code&gt;flex-wrap:wrap&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;In my last some of the projects, I have to change almost the entire code in media queries so that my website look good on an mobile device. This can be avoided to a great extent by using:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flex-wrap: wrap;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, use it wisely whenever needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bootstrap Basics
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap is a css library, which consists of code written by someone-else, taking care of all the styles and responsive web design. To use it in our projects, go to &lt;a href="https://getbootstrap.com/" rel="noopener noreferrer"&gt;Bootstrap&lt;/a&gt; and copy the css link inside of your html file.
&lt;/li&gt;
&lt;li&gt;To use any-functionality of bootstrap, just link bootstrap with your html, and then just specify in the class of your html tag, what you want to do with that element, among some classes given in bootstrap website.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, if you want to design a warning button:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class = "btn btn-warning"&amp;gt;  Warning  &amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now practice and get your hands dirty ..&lt;/p&gt;

&lt;h3&gt;
  
  
  Bootstrap column model
&lt;/h3&gt;

&lt;p&gt;This is a bootstrap way to make sure that our web-pages are mobile responsive. In this model, bootstrap divides its page into 12 distinct columns. &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%2Fuploads%2Farticles%2Fheo7r87e6dw0pqj802m2.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%2Fuploads%2Farticles%2Fheo7r87e6dw0pqj802m2.png" alt="Bootstrap column model in action"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Large screen:-&lt;br&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%2Fuploads%2Farticles%2Fqb3ll9herhmmke7yk1h9.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%2Fuploads%2Farticles%2Fqb3ll9herhmmke7yk1h9.png" alt="ON large scrren"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as we shrink the size of the screen down.&lt;br&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%2Fuploads%2Farticles%2Fefxefvi4fjtqbziahyae.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%2Fuploads%2Farticles%2Fefxefvi4fjtqbziahyae.png" alt="On small screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bootstrap also let us specify how many columns should an div take, depending on the size of the screen as small or large. Here is the example:-&lt;/li&gt;
&lt;/ul&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%2Fuploads%2Farticles%2Fxbc288dn811nezjt39s6.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%2Fuploads%2Farticles%2Fxbc288dn811nezjt39s6.png" alt="IMage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This behaves as 4 div in 1 row on a large screen, and 2 div's in each row on a small screen.&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%2Fuploads%2Farticles%2Flgmtf31aky2kedqthd0w.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%2Fuploads%2Farticles%2Flgmtf31aky2kedqthd0w.png" alt="large screen"&gt;&lt;/a&gt;&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%2Fuploads%2Farticles%2Fo21v8rvsfkjl65w1479v.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%2Fuploads%2Farticles%2Fo21v8rvsfkjl65w1479v.png" alt="small screen"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  SASS inheritance
&lt;/h2&gt;

&lt;p&gt;Let's suppose we are designing 3 alert messages as below:-&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%2Fuploads%2Farticles%2Fm2hy2qn2vgm1jphwe0dl.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%2Fuploads%2Farticles%2Fm2hy2qn2vgm1jphwe0dl.png" alt="alert pic"&gt;&lt;/a&gt;&lt;br&gt;
If we write it using nesting in sass, then in the output css, the code will be copyed in the css styling of all the alert, this will increase the size of our css to a large extent in long term. To solve this problem, we use inheritance. &lt;/p&gt;

&lt;p&gt;Hence, the better solution of the above problem will be :-&lt;br&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%2Fuploads%2Farticles%2F9xtplroh1k051hsf4k8t.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%2Fuploads%2Farticles%2F9xtplroh1k051hsf4k8t.png" alt="better code using inheritance"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  New things learnt about Git
&lt;/h1&gt;

&lt;p&gt;When you clone an empty repository from github, and them modify it and commit in your local machine, then if you run the &lt;code&gt;git status&lt;/code&gt; command, you will get some "error-looking" message, the reason for that is:-&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%2Fuploads%2Farticles%2Fl6nv6qdh2ucdwwwxei9j.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%2Fuploads%2Farticles%2Fl6nv6qdh2ucdwwwxei9j.png" alt="error during first commit in an empty git repo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Completed the google search project and uploaded everything to git
&lt;/h2&gt;

</description>
      <category>100daysofcode</category>
      <category>webdev</category>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>Day 5: 100 days of code, FrontendMentor Projects Summary</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Wed, 18 Aug 2021 16:39:44 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-5-100-days-of-code-li3</link>
      <guid>https://dev.to/gauravshekhawat/day-5-100-days-of-code-li3</guid>
      <description>&lt;p&gt;Starting day 5…&lt;/p&gt;

&lt;h2&gt;
  
  
  FrontendMentor :- Order Summary Component
&lt;/h2&gt;

&lt;p&gt;Learnings:-&lt;br&gt;
Made an outer-container, and then set the background image as that svg file, due to this there is no distortion in that. Also, set the background-size to 100vw, so that the image fill the whole width of the outer-container.&lt;br&gt;
It is good if you put the below code at the start of each sass file. By this, we can then manually set the margin and padding for each element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{ 
margin:0;
padding:0;
box-sizing:border-box;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the sass file, while putting colors as hsl or rgb, you have to put spaces between the values otherwise it will give an error. Hence,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;box-shadow: 0px 0px 16px 5px rgba(0, 0, 0, 0.21);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will work but&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;box-shadow: 0px 0px 16px 5px rgba(0 0 0 0.21);      //wontwork
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the width of the "card" div not in term of percentage of the "outer-container", because it will shrink in that case as we decrease the size of the window. Better, you should set the width as:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.card{
max-width: 450px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By this, the size of your card will not decrease as the width of the window decreases.&lt;br&gt;
Setting the media queries:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media only screen and (max-width: 600px) {
* {
font-size: 14px;
}
.outer-container {
background: url("./order-summary-component-main/images/pattern-background-mobile.svg") hsl(225deg, 100%, 94%);
background-size: 100vw;
background-repeat: no-repeat;
}
.container {
margin: 70px 0;
width: 330px;
}
.annual-plan {
width: content-width;
}
}

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

&lt;/div&gt;



&lt;p&gt;Remember that&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;width:content-width;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;is a very powerful tool. Use it wisely.&lt;/p&gt;

&lt;h2&gt;
  
  
  FrontendMentor :- Stats preview card component
&lt;/h2&gt;

&lt;p&gt;Learnings:-&lt;br&gt;
wasted 30 minutes, trying to put that violet mask over the image, then found the correct way to do that using pseudo elements(covered in day 2, also remember that don't try to use pseudo elements on images, as it will not work sadly).&lt;/p&gt;

&lt;p&gt;HTML code:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="imagediv"&amp;gt;
&amp;lt;img src="./stats-preview-card-component-main/images/image-header-desktop.jpg" alt="" /&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS code:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.imagediv{
position: relative;
}
.imagediv::after{
position: absolute;
content:'';
display: block;
inset:0;
width:100%;
opacity:0.5;
height:100%;
background: hsl(277, 84%, 61%);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Spent the whole time to fit the image inside of that container, to the left. The best solution I found was using this:-&lt;/p&gt;

&lt;p&gt;HTML:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="imagediv"&amp;gt;
&amp;lt;img src="./stats-preview-card-component-main/images/image-header-desktop.jpg" alt=""/&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.imagediv {
position: relative;    //  this is used for the point this point.
width:50%;     // width of image container as half of total
img {
object-fit:cover;      //this preserve the aspect ratio and 
                         trims off extra image left                                                                 
width:100%;
height:100%;
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;If two div's borders are overlapping, then you can combine them using:-
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;border-collapse: collapse;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full reference:- &lt;a href="https://css-tricks.com/almanac/properties/b/border-collapse/" rel="noopener noreferrer"&gt;CSS tricks&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/grvskwt/embed/RwVzMzp?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS checked pseudo class
&lt;/h3&gt;

&lt;p&gt;The implementation can be seen in the above codepen. &lt;br&gt;
The full description, you can find on:- &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/:checked" rel="noopener noreferrer"&gt;MDNdocs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Summary: &lt;a href="https://css-tricks.com/almanac/selectors/c/checked/" rel="noopener noreferrer"&gt;css-tricks&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS &lt;code&gt;element1~element2&lt;/code&gt; Selector
&lt;/h3&gt;

&lt;p&gt;FULL description :-  &lt;a href="https://www.w3schools.com/cssref/sel_gen_sibling.asp" rel="noopener noreferrer"&gt;W3Schools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Summary: Basically if the code is &lt;code&gt;p~ul&lt;/code&gt; , then it selects all the &lt;code&gt;ul&lt;/code&gt; below &lt;code&gt;p&lt;/code&gt; which have the same parent as &lt;code&gt;p&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  CSS &lt;code&gt;element+element&lt;/code&gt; Selector
&lt;/h3&gt;

&lt;p&gt;Summary: If the code is &lt;code&gt;div + p&lt;/code&gt; then it selects all the &lt;code&gt;p&lt;/code&gt; , immediately after &lt;code&gt;div&lt;/code&gt; ( and not as child of div, basically the p which is just after the closing div tag)&lt;/p&gt;

&lt;p&gt;Full reference :- &lt;a href="https://www.w3schools.com/cssref/sel_element_pluss.asp" rel="noopener noreferrer"&gt;w3schools&lt;/a&gt;&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%2Fuploads%2Farticles%2Fho3ot3c5izav88mji4do.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%2Fuploads%2Farticles%2Fho3ot3c5izav88mji4do.png" alt="Table specifying selectors"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Other frontendmentor projects done:-
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;four card feature section&lt;/li&gt;
&lt;li&gt;three column preview card&lt;/li&gt;
&lt;li&gt;profile card component.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>100daysofcode</category>
      <category>frontendmentor</category>
      <category>css</category>
    </item>
    <item>
      <title>Day 4: 100 days of code, innerHTML and innerText difference in JS</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Tue, 17 Aug 2021 19:04:40 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-4-100-days-of-code-3egl</link>
      <guid>https://dev.to/gauravshekhawat/day-4-100-days-of-code-3egl</guid>
      <description>&lt;h3&gt;
  
  
  DIfference between innerHTML and innerText in js
&lt;/h3&gt;

&lt;p&gt;see this &lt;a href="https://betterprogramming.pub/whats-best-innertext-vs-innerhtml-vs-textcontent-903ebc43a3fc"&gt;medium&lt;/a&gt; article for details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@parasbisht/difference-between-innerhtml-innertext-and-textcontent-c0789c6dd9c1"&gt;This&lt;/a&gt; is short summary of the above article.&lt;/p&gt;

&lt;h3&gt;
  
  
  Difference between &lt;code&gt;getElementById&lt;/code&gt; and &lt;code&gt;getElementsByClassName&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The difference that I found through trial and error:-&lt;br&gt;&lt;br&gt;
The &lt;code&gt;getElementById&lt;/code&gt; will select only one element(as only one element will have that unique id), while in the arguments of &lt;code&gt;getElementsByClassName&lt;/code&gt; we can provide multiple classes, and it will select all the elements matching those classes. Hence &lt;code&gt;getElementsByClassName&lt;/code&gt; is like an array. Example:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="parentDiv"&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To access the above, you have to write&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var divToBeAppended = document.getElementsByClassName("parentDiv");
divToBeAppended[0].appendChild(newButton);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Important things to remember:-
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5TFDiDuO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcaromptgkar914mtxqi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5TFDiDuO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcaromptgkar914mtxqi.png" alt="centering using margin auto"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In case of a image as direct child of an div with rounded corners, the image will overflow through the container. To stop that, you can use:-&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
overflow:hidden;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Things i couldn't make a summary of:-
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Change button colors project&lt;/li&gt;
&lt;li&gt;Kotlin basics:- functions, variables, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Things couldn't complete ( try again)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;CP problem:- Time is Mooney &lt;/li&gt;
&lt;li&gt;CP DP handbook last section&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day 3: 100 days of Code , Javascript Fundamentals, With Some Important Functions</title>
      <dc:creator>Gaurav-Shekhawat</dc:creator>
      <pubDate>Mon, 16 Aug 2021 11:59:18 +0000</pubDate>
      <link>https://dev.to/gauravshekhawat/day-3-100-days-of-code-3ehm</link>
      <guid>https://dev.to/gauravshekhawat/day-3-100-days-of-code-3ehm</guid>
      <description>&lt;p&gt;Today, I will be learning javascript. So, let's begin..&lt;/p&gt;

&lt;h2&gt;
  
  
  Javascript
&lt;/h2&gt;

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

&lt;p&gt;Hoisting is a javascript mechanism where variables and functions declarations are moved to the top of their scope before code execution. Example: this code :-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; console.log (greeter);
 var greeter = "say hello";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will be treated as-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter;
console.log(greeter);  //greeter is undefined
greeter = "say hello";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, &lt;code&gt;var&lt;/code&gt; variables are hoisted to the top of their scope and initialised with the value of &lt;code&gt;undefined&lt;/code&gt;.&lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; are hoisted but not initialsed and hence if we try to use them before initialising like the above example, we will get a &lt;code&gt;Reference Error&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Some ways to access the values or properties of a object
&lt;/h3&gt;

&lt;p&gt;Let person be an object:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let person: {
name : "John",
class : 10,
good : true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To access name of person:-&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Method-1:-  &lt;code&gt;person.name&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Method-2:-  &lt;code&gt;person["name"]&lt;/code&gt;. Attention, here you must put the value of the property inside the double or single quotes, &lt;code&gt;person[name]&lt;/code&gt; will not work.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;We can change the value of properties of both a "let" and a "const" object, but we cannot add or remove properties in case of "const" object.(for the case of var, we can).Example:-&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let student = {
    class: 10,
    name: "John",
    padal: true
}

student.huehue = false; //no errors
console.log(student); // prints {class: 10, name: "John", padal: true, huehue: false}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Defining functions inside of an object
&lt;/h3&gt;

&lt;p&gt;We can define functions inside of an object, the syntax will be:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let student = {
name : "John",
studentInfo: function (){
   return name;
}
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the function like:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(student.studentInfo());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  switch statements
&lt;/h3&gt;

&lt;p&gt;The syntax is like:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;switch (expression) {
    case 0:
        text = "weekend";
        break;
    case 1:
        text = "not-weekend";
        break;
    case 2:
        text = "weekend";
        break;
    default:
        text = "no_idea";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where expression is the expression whose values we are putting in the cases, such as "0", "1" etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Json
&lt;/h3&gt;

&lt;p&gt;JSON stands for javascript object notation. It is basically an array of objects.&lt;br&gt;
Do the below thing to include a JSON file inside your project. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Bu8cac10--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpf4kxjw0x79y2kb9rrf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Bu8cac10--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpf4kxjw0x79y2kb9rrf.png" alt="SS of youtube"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  An important guide to object-keys in javascript
&lt;/h3&gt;

&lt;p&gt;see this &lt;a href="https://medium.com/@alifabdullah/never-confuse-json-and-javascript-object-ever-again-7c32f4c071ad"&gt;medium&lt;/a&gt; article.  &lt;/p&gt;
&lt;h2&gt;
  
  
  Other short points:-
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Var, let, and const, What's the difference? - &lt;a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/"&gt;freecodecamp&lt;/a&gt; . Read only the last para for summary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Some new short topics learnt:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;getElementById(" ")&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;innerHTML&lt;/code&gt; :- make sure you write value of Id and 
innerHTML in double quotes/or single maybe.&lt;/li&gt;
&lt;li&gt; &lt;code&gt;prompt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;indexOf(" ")&lt;/code&gt;&lt;/li&gt;
&lt;li&gt; &lt;code&gt;slice(firstIndex, lastIndex)&lt;/code&gt;:- The first index is included while the last is excluded.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toUpperCase()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;toLowerCase()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;replace("oldsubstring", "newsubstring")&lt;/code&gt; :- Example:-
if the string initial is banana, then replace("ban", "123") will give "123ana".&lt;/li&gt;
&lt;li&gt;&lt;code&gt;charAt(index)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;split("someseperator")&lt;/code&gt; :- if nothing is passed such as &lt;code&gt;split("")&lt;/code&gt;, then it will split the individual character of the string.
11 . &lt;code&gt;toString()&lt;/code&gt;:- can also be used on arrays, in that case all the elements of the array will become seperated by commas, without any space in between.
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Array common methods
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;join("somespecifier")&lt;/code&gt; :- make a string out of an array, concatenating elements by putting "somespecifier" between them.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pop&lt;/code&gt; :- removes the last element from the array.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;push("newElementInTheArray")&lt;/code&gt; :- appends &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;shift()&lt;/code&gt;:- removes first element from the array, very expensive thing to do.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;unshift()&lt;/code&gt;:- add first element to the array.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reverse()&lt;/code&gt;:- reverses the order of the array&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sort()&lt;/code&gt;:- while sorting numbers, if you do not pass any function with sort, then the numbers will not be sorted. So, to sort in ascending order, you must write
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myArray.sort(function(a,b){return (a-b);});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and to sort in descending order:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myArray.sort(function(a,b){return (b-a);});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;You can declare an array, also like:-
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myArray = new Array();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Define the array inside the (), if you want to.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;onclick&lt;/code&gt;:-
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class = "btn-primary" onclick="ageInDays()"&amp;gt;Click me&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here ageInDays is a javascript functions defined in the js file. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After creating an html element, using createElement, If you are creating an 'img', then during the source allocation of the img:-
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;image.setAttribute("src","//unsplash.it/200/200"); //wrong
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is wrong, and the correct way is:-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img.src = "//unsplash.it/200/200";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Topics need to improve upon
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;functions inside of sort&lt;/li&gt;
&lt;li&gt;JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Other topics that I did but unable to write
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Challenge: your age in days&lt;/li&gt;
&lt;li&gt;Challenge: Cat generator challenge&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>100daysofcode</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>creatingsummary</category>
    </item>
  </channel>
</rss>
