<?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: Kawsar Hossain</title>
    <description>The latest articles on Forem by Kawsar Hossain (@thekawsarhossain).</description>
    <link>https://forem.com/thekawsarhossain</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%2F690901%2F87a5132e-c273-4664-aa17-a54cd87a1f2a.png</url>
      <title>Forem: Kawsar Hossain</title>
      <link>https://forem.com/thekawsarhossain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/thekawsarhossain"/>
    <language>en</language>
    <item>
      <title>Exploring the Magic of Sass ✨</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Sun, 20 Aug 2023 09:11:20 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/exploring-the-magic-of-sass-506f</link>
      <guid>https://forem.com/thekawsarhossain/exploring-the-magic-of-sass-506f</guid>
      <description>&lt;p&gt;Hey there, let's dive into the enchanting world of Sass! Sass, or Syntactically Awesome Stylesheet, is a powerful scripting language that takes your CSS experience to a whole new level. Think of it as a wizard's toolkit for enhancing your stylesheets with supercharged features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unraveling the Mystery of Sass
&lt;/h2&gt;

&lt;p&gt;Sass isn't just a language; it's a CSS preprocessor, which means it extends the capabilities of regular CSS. Imagine being able to use variables, nesting, mixins, and more, all within your stylesheets. It's like adding a touch of magic to your styling workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Different Flavors of Sass
&lt;/h3&gt;

&lt;p&gt;Sass comes in two delightful flavors: &lt;code&gt;.sass&lt;/code&gt; and &lt;code&gt;.scss&lt;/code&gt;. In &lt;code&gt;.sass&lt;/code&gt;, the syntax is clean and indented:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sass"&gt;&lt;code&gt;&lt;span class="nt"&gt;nav&lt;/span&gt;
  &lt;span class="nt"&gt;ul&lt;/span&gt;
    &lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;

  &lt;span class="nt"&gt;li&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;

  &lt;span class="nt"&gt;a&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meanwhile, &lt;code&gt;.scss&lt;/code&gt; mirrors the familiar CSS syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;nav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&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;h3&gt;
  
  
  Unveiling the Power of Variables
&lt;/h3&gt;

&lt;p&gt;Sass introduces the concept of variables, just like programming languages. You prepend a dollar sign to the variable name and assign values like strings, numbers, colors, and more:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$primary_font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$highlight_color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;crimson&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$base_font_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;$container_width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;960px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$primary_font&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$base_font_size&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$highlight_color&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$container_width&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;This magical feature sets Sass apart, especially since CSS custom properties don't enjoy full browser support yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Navigating the Nesting Labyrinth
&lt;/h3&gt;

&lt;p&gt;Sass nesting is a superpower! Say goodbye to repetitive selectors. Instead of writing the same selector multiple times in CSS, Sass lets you nest them within each other:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;nav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;li&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&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;Nesting isn't just for parent-child relationships; it's also perfect for handling pseudo-classes like &lt;code&gt;:hover&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;hotpink&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&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;Using the &lt;code&gt;&amp;amp;&lt;/code&gt; symbol helps weave this enchanting web of selectors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Marveling at Nested Properties
&lt;/h3&gt;

&lt;p&gt;Nested properties in Sass add elegance to your styling. When multiple properties share a common prefix, you can bundle them together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Helvetica&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="na"&gt;weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;lowercase&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&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;By grouping properties, your code becomes cleaner and more manageable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Summons with @import and Partials
&lt;/h3&gt;

&lt;p&gt;Sass is all about DRYness—Don't Repeat Yourself. You can create partial files with shared variables, colors, and more, and then import them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;"variables"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;"colors"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@import&lt;/span&gt; &lt;span class="s2"&gt;"typography"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Your main styles here&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And if you want to differentiate partials, prepend an underscore like &lt;code&gt;_partial.scss&lt;/code&gt;. Sass won't transpile files starting with an underscore.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Enchanting @mixin and @extend
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;@mixin&lt;/code&gt; is your spellbook for creating reusable sets of CSS properties. It's a boon for maintaining consistent styles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="k"&gt;@mixin&lt;/span&gt; &lt;span class="nf"&gt;important-text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;bold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.danger&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@include&lt;/span&gt; &lt;span class="nd"&gt;important-text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&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;On the other hand, &lt;code&gt;@extend&lt;/code&gt; lets you share a set of properties from one selector to another:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nc"&gt;.button-basic&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button-report&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nc"&gt;.button-basic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;red&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.button-submit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;@extend&lt;/span&gt; &lt;span class="nc"&gt;.button-basic&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;green&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&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;While they both help avoid repetition, &lt;code&gt;@mixin&lt;/code&gt; is better for standalone reusable styles, and &lt;code&gt;@extend&lt;/code&gt; is more suited for inheriting styles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Looping and Interpolation: The Sorcery Within
&lt;/h3&gt;

&lt;p&gt;Looping in Sass is like weaving spells. Create lists and loop through them to generate CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$sizes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;72px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;@each&lt;/span&gt; &lt;span class="nv"&gt;$size&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="nv"&gt;$sizes&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.icon-&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="nv"&gt;$size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;$size&lt;/span&gt;&lt;span class="p"&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;The &lt;code&gt;#{$size}&lt;/code&gt; part is interpolation—bringing variables into your strings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Embracing the Magic of Sass Functions
&lt;/h3&gt;

&lt;p&gt;Functions in Sass let you create reusable pieces of logic. You can even use built-in utility functions for quick styling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight scss"&gt;&lt;code&gt;&lt;span class="nv"&gt;$primary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#11141f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nc"&gt;.box&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;lighten&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$primary&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;25%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;darken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$primary&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="m"&gt;30%&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;These functions make styling more intuitive and efficient.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Grand Finale: @mixin vs. @extend
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;@mixin&lt;/code&gt; and &lt;code&gt;@extend&lt;/code&gt; serve different purposes. &lt;code&gt;@mixin&lt;/code&gt; is like creating a spell recipe. It bundles a set of properties to reuse. &lt;code&gt;@extend&lt;/code&gt; is like sharing magic among spellcasters—it lets you extend one selector's properties to another. While both reduce repetition, they shine in different scenarios.&lt;/p&gt;

&lt;p&gt;In a world of styles and enchantment, Sass is your trusty wand, weaving efficiency and elegance into your stylesheets. So, harness its powers, and let your styles shimmer and shine like never before! 🌟🎩&lt;/p&gt;

</description>
      <category>css</category>
      <category>scss</category>
      <category>programming</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Exploring JavaScript Fundamentals!</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Tue, 08 Aug 2023 12:25:07 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/exploring-javascript-fundamentals-mk0</link>
      <guid>https://forem.com/thekawsarhossain/exploring-javascript-fundamentals-mk0</guid>
      <description>&lt;h3&gt;
  
  
  What is JavaScript?
&lt;/h3&gt;

&lt;p&gt;JavaScript is a versatile and widely-used programming language primarily used for building interactive and dynamic features on websites and web applications.&lt;/p&gt;

&lt;p&gt;Now let’s dive deeper into some intriguing concepts:&lt;/p&gt;

&lt;h3&gt;
  
  
  High Abstraction
&lt;/h3&gt;

&lt;p&gt;So here the question comes what is abstraction? An abstraction is a way of hiding the implementation details and showing only the functionality to the users.&lt;/p&gt;

&lt;p&gt;In the context of programming, abstraction allows developers to work on complex systems or concepts without needing to understand all the underlying complexities&lt;/p&gt;

&lt;p&gt;So that means JavaScript is hiding more technical complexities and inner workings from the developers.&lt;/p&gt;

&lt;p&gt;When we work with JavaScript, we’re interacting with a high-level language that shields us from the low-level details of memory management, hardware interactions and other technical aspects. This abstraction simplifies the development process, making it more accessible and efficient to create interactive and dynamic web applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Garbage Collected
&lt;/h3&gt;

&lt;p&gt;In JavaScript, we don’t need to worry about garbage cleanup. An algorithm inside JavaScript takes care of garbage collection and cleaning.&lt;/p&gt;

&lt;p&gt;So, when you’re done using something in JavaScript, like an old toy you don’t play with anymore, you can just forget about it. The garbage collector will swing by when you’re not looking and scoop up all those forgotten things, freeing up space for new things you want to use.&lt;/p&gt;

&lt;h3&gt;
  
  
  JIT compiled
&lt;/h3&gt;

&lt;p&gt;JavaScript is not purely interpreted language; rather, modern JavaScript is Just in Time compiled. It’s a process that dynamically translates the human-readable code into machine-executable code at run time, significantly enhancing its performance and execution speed.&lt;/p&gt;

&lt;p&gt;In contrast, an interpreted language like Python or Ruby directly executes the source code line by line without an intermediate compilation step. This can lead to comparatively slower execution speeds since the code is translated on-the-fly during runtime.&lt;/p&gt;

&lt;p&gt;On the other hand, a compiled language, such as C++ or Java, first translates the entire source code into machine code before execution. This often results in faster performance compared to interpreted languages as the compilation step optimizes the target platform’s code before execution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-paradigm
&lt;/h3&gt;

&lt;p&gt;First, what is a paradigm? Well, the paradigm is a mindset of code structure that will determine your coding style.&lt;/p&gt;

&lt;p&gt;In programming, going multi-paradigm means something cool -it’s about mixing and matching different programming styles within one programming language. Each style or paradigm brings its own set of tools and techniques to the table. When you blend these paradigms, you get a coding toolbox that’s more diverse and versatile, kind of like having a bunch of superpowers.&lt;/p&gt;

&lt;p&gt;In JavaScript, there are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Procedural Programming(step-by-step instructions)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Object Oriented Programming or (OOP)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Functional Programming(FP)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, when you go multi-paradigm with JavaScript, you’re not stuck with just one way to code — you get to pick what works best for each situation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prototyped-based
&lt;/h3&gt;

&lt;p&gt;In JavaScript, nearly everything is treated like an object, except for the primitive data types.&lt;/p&gt;

&lt;p&gt;Now, a “prototype” is like a blueprint or a template that an object can inherit properties and methods from. It’s like a handy guide that helps objects know what they can do and how they should behave. So, instead of creating every object from scratch, JavaScript lets you create one object with all the cool stuff, and then other objects can borrow those cool traits.&lt;/p&gt;

&lt;p&gt;Let’s say you have a “Car” object with all the details about speed, colour, and even how to start the engine. You can then make new car objects that inherit all these details, and you can even add or change stuff if you want — it’s like making customized versions of the original.&lt;/p&gt;

&lt;p&gt;So, when JavaScript is prototyped-based, it’s all about this dynamic link between objects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Functions are the first-class citizen
&lt;/h3&gt;

&lt;p&gt;This means you can treat functions like VIPs in the world of programming. They are so flexible that you can toss them around wherever you like. It’s like having these versatile tools that you can use however you want.&lt;/p&gt;

&lt;p&gt;For example, You can treat functions as available. You can pass a function as a parameter of a function. You can return a function from inside of another function. This feature gives a lot of flexibility while using functions&lt;/p&gt;

&lt;h3&gt;
  
  
  Dynamically Typed
&lt;/h3&gt;

&lt;p&gt;This means you don’t have to play the “label game” when you create a variable in JavaScript. You know how, in some languages, you have to put a tag on your variable saying it’s a number, a text, or something else? Well, in JavaScript, you’re free from that hassle.&lt;/p&gt;

&lt;p&gt;When you declare a variable, you don’t need to say, “Hey, this is going to be a number!” or “Hold on, this will be a string!” No tags, no declarations — you can just dive right in.&lt;/p&gt;

&lt;h3&gt;
  
  
  Single-Threaded
&lt;/h3&gt;

&lt;p&gt;Single-threaded means the execution of instructions happens in a single sequence. It’s like having a single-lane road where cars follow each other in a straight line, without any branching or parallel paths.&lt;/p&gt;

&lt;p&gt;So, when your code runs single-threaded, it’s like taking one step at a time — no jumping ahead or going in different directions. It’s like reading a story from the beginning to the end, not skipping chapters.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>fundamentals</category>
    </item>
    <item>
      <title>Some topics on Javascript methods.</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Sat, 25 Dec 2021 13:01:22 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/some-topics-on-javascript-methods-282j</link>
      <guid>https://forem.com/thekawsarhossain/some-topics-on-javascript-methods-282j</guid>
      <description>&lt;p&gt;Overview: Today in this article we will know about some topics/methods of Javascript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1- Javascript string&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;charAt:&lt;/strong&gt; The charAt() method returns the character at the index which will be given in this(index) method in a string.&lt;br&gt;
const text = 'hello world';&lt;br&gt;
console.log(text.charAt(6))&lt;br&gt;
// and the answer will be "w" becasue in this text the sixth charecter is w and the charat method check the text and give the answer depened on the index that we have provided in this method&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;concat():&lt;/strong&gt; This method is used for concatenate strings together.&lt;br&gt;
const textOne = 'Hello';&lt;br&gt;
const textTwo = 'World';&lt;br&gt;
console.log(textOne.concat(textTwo))&lt;br&gt;
// and the answer will be "helloWorld" we can concate more string like this&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;includes(): *&lt;/em&gt; This method returns true if a string contains a specified string. Otherwise, it will returns false&lt;br&gt;
const text = "hello world";&lt;br&gt;
console.log(text.includes('world'))&lt;br&gt;
// and the answer will be true because the method checked the text variable with the string that we are given in the method and the method finds it true and return true&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;endsWith():&lt;/strong&gt; This method will return true if the a string ends with a specified string otherwise it will return false, and this method is case sensitive.&lt;br&gt;
const line = "hello there what's upp";&lt;br&gt;
console.log(line.endsWith('upp'))&lt;br&gt;
// and the answer will return true because here in this method the the text ends with the string 'upp' and we provide the 'upp' string text and its matched that's why it return true  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;indexOf():&lt;/strong&gt; This method will return the position of the first occurrence of a specified value in a string.If the value isn’t available in the string then it will return the -1 value otherwise it will return the index.We can also set the starting index in indexOf method so that it can start the method from there.&lt;br&gt;
const array = ["one", "two", "three", "two"];&lt;br&gt;
console.log(text.indexOf('two'));&lt;br&gt;
// and the answer will be 1 index number because here in this method we provided the 'two' and this method finds the first 'two' in the one number index and it will return 1&lt;br&gt;
const array = ["one", "two", "three", "two"];&lt;br&gt;
console.log(array.indexOf('two', 2));&lt;br&gt;
// Now here it will search the index of ‘two’ from the second index. and it will return 3&lt;br&gt;
&lt;strong&gt;lastIndexOf():&lt;/strong&gt; This method also works like indexOf but this method start searching from the last index&lt;br&gt;
const array = ["one", "two", "three", "two"];&lt;br&gt;
console.log(array.indexOf('two'));&lt;br&gt;
// Now here it will search the index of ‘two’ from the last index. and it will return 0 because this method start searching from the last index&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;replace():&lt;/strong&gt; this method is used to replace a string with another string we can add/give two-parameter one is what we want to change another is what will be the new string. And we can also replace with all match strings using a regular expression like this&lt;br&gt;
const textOne = 'hello world';&lt;br&gt;
console.log(textOne.replace('hello', 'hi'));&lt;br&gt;
// and the output will be come 'hi world'&lt;/p&gt;

&lt;p&gt;const textTwo = 'hello there ! hello'&lt;br&gt;
console.log(textTwo.replace(/hello/g, 'hi'))&lt;br&gt;
// and now the output will be come like this: 'hi world ! hi' because it replace the all matching string that we given in the first second paremeter&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;trim():&lt;/strong&gt; using this method we can remove the extra spaces in  our strings we don’t need any parameter in this method we can use this normally like this &lt;br&gt;
const text = '    hello      '&lt;br&gt;
console.log(text.length)&lt;br&gt;
// here is the length of this text varibale is 15 now we will going to trim it using trim&lt;br&gt;
console.log(text.trim())&lt;br&gt;
// now the length will be 5 because we trimed the text variable&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;isNaN():&lt;/strong&gt; The isNaN method is used to check the given value is a number or not if the value is a number then it will return false and if the number is not a number then it will return true.&lt;br&gt;
const number = 100;&lt;br&gt;
console.log(isNaN(number))&lt;br&gt;
// here the answer will be false because the given value is an number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Split():&lt;/strong&gt; The split method splits or divides the string depending on the value of the method that we are going to add. And it will return an array. Just like if we want to divide a string into the spaces of string we can run the code like this&lt;br&gt;
const text = 'hello World! How are you?'&lt;br&gt;
console.log(text.split(' '))&lt;br&gt;
// here the answer will be look like this  [ 'hello', 'World!', 'How', 'are', 'you?' ] because we divide the string by the spaces&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;findIndex():&lt;/strong&gt; This method returns the index of the first element in the array that is matched with the provided testing function in findIndex. And if the value is not matched with the array then it will return -1 we can check/ use like this &lt;br&gt;
const numbers = [10, 20, 30, 40, 50];&lt;br&gt;
const result = numbers.findIndex(number =&amp;gt; number &amp;gt; 20 &amp;amp;&amp;amp; number &amp;lt; 40)&lt;br&gt;
console.log(result)&lt;br&gt;
// and here the answer will be 2 because the match first match index is 2&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;join():&lt;/strong&gt; This method creates or concatenates and returns a new string by concatenating all of the elements in an array. &lt;br&gt;
const books = ["Bangla", "English", "Math", "Physics", "Chemistry"]&lt;br&gt;
console.log(books.join())&lt;br&gt;
// and here the answer will be like this "Bangla,English,Math,Physics,Chemistry" because this method concatenates the values and return as a string.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;reduce():&lt;/strong&gt; using this method we can use another call back function on it we can give it two-parameter and we can make them how to work and we have to give the initial value. After run this method it will return a single value &lt;br&gt;
const numbers = [10, 20, 30, 40, 50];&lt;br&gt;
const sum = numbers.reduce((previousValue, currentValue) =&amp;gt; {&lt;br&gt;
    return previousValue + currentValue&lt;br&gt;
}, 0)&lt;br&gt;
console.log("the sum is", sum)&lt;br&gt;
// now the result will be 150 because it takes all the array elements into the reducer and do the addition with the previousValue and Next value and its starts with the 0&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Some topics about backend developement !</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Thu, 23 Dec 2021 17:38:43 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/some-topics-about-backend-developement--30dl</link>
      <guid>https://forem.com/thekawsarhossain/some-topics-about-backend-developement--30dl</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt; Today in this article we will going to know about some backend development topics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CRUD Operations&lt;/strong&gt;&lt;br&gt;
CRUD is an abbreviation that stands for Create, Read, Update, and Delete. These four are the most basic operations which can be performed with most traditional database systems and they are the backbone for interacting with any database. Let’s get started to understand the concepts of CRUD operations.&lt;br&gt;
Create: This operation is performed to send or post the data on the server. On our website, we have to store multiple just as text, image, address, date, etc to store this kind of data we need to post them on the database. The create operation is performed to post data in the database.&lt;br&gt;
Read: This operation is performed to get the data from the database. When we visit a website under the hood they send a GET request to the server to perform this read operation. That means the Read operation is performed to get the data from the database.&lt;br&gt;
Update: This operation is performed to update any value which is already in the database. This operation sends a PUT request to update the specific value in the database.&lt;br&gt;
Delete: This operation is performed to delete any specific value in the database. We can delete any kind of value by using this delete operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JWT&lt;/strong&gt;&lt;br&gt;
JWT the full form of JWT is JSON Web Token. This token is used for security purposes.JWT is a good way of securely transmitting information between parties because it can be signed. Normally if we say that the JWT is a way to identify the owner of some JSON data, It’s an encoded, URL-safe string It can contain an unlimited amount of data. When a server receives a JWT token, it can guarantee that the data contained can be trusted because it’s signed by the source. No middleman can modify a JWT once it’s sent.JWT guarantees data ownership but not encryption that means the data can be seen by anyone that intercepts the token because it’s serialized, not encrypted. The JWT is mostly used in API authentication and server-to-server authorization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mongoose&lt;/strong&gt;&lt;br&gt;
Mongoose is a Javascript framework that is commonly used in NodeJs applications with the MongoDB database. It is an Object Modeling library for MongoDB. Mongoose manages the relationships between data, provides schema validation, and is also used to translate between objects in code and the representation of those objects in MongoDB. Mongoose helps to validate the collection of the MongoDB database and it can be done easily. Mongoose has a predefined structure that can be implemented on the collection. Constraints can be applied to documents of collections using Mongoose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Relational database (MySql)&lt;/strong&gt;&lt;br&gt;
A relational database is a collection of data that pre-defined relationships between them. And these data are organized as a set of tables with columns and rows. That means we have to store the data on a relational database in a column and row-wise. Relational databases are vertically scalable and vertical scaling refers to increasing the processing power of a single server. The performance is poor in relational databases but its speed is considerably higher because of its ease and simplicity. And also there are various optimizations that are included in a relational database further increase its speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aggregation&lt;/strong&gt;&lt;br&gt;
Aggregation is a framework that allows us to analyze our data in real-time. The main and the key element in Aggregation is called the pipeline. The Aggregation pipeline consists of one or more stages that process the documents and each stage performs an operation on the input documents&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Express&lt;/strong&gt;&lt;br&gt;
Express is an open-source web application framework for NodeJs it helps to create and maintain the server. It is a server-side framework for building single-page, multipage, and also for hybrid web applications. Express js makes the backend development easier for the developers it is easier to write secure, modular, and fast applications using this Express js.Express Js is easy to configure and customize.&lt;/p&gt;

</description>
      <category>node</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>About ReactJs !</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Thu, 23 Dec 2021 15:13:08 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/about-reactjs--1g4h</link>
      <guid>https://forem.com/thekawsarhossain/about-reactjs--1g4h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt; Today in this article we are going to know about some core features of React&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PropTypes&lt;/strong&gt;&lt;br&gt;
PropTypes is a library that helps in finding the error in props. Like if we need to send data to the other component in the string, but if we accidentally send the data in number then we will not get the output that we are expecting and it will be tough to identify the problem we were made but by using this propTypes library we will get the error if we send string except number. In propTypes we can set the types of the prop just like this&lt;br&gt;
import PropTypes from "prop-types";&lt;br&gt;
function DisplayData ({name, age}){&lt;br&gt;
    return &lt;code&gt;Hello there this is ${name} and my age is ${age}&lt;/code&gt;&lt;br&gt;
}&lt;br&gt;
DisplayData.propTypes = {&lt;br&gt;
    name: PropTypes.string, // here the type can be a number , boolean,string, func, object, array symbol&lt;br&gt;
    age: PropTypes.number&lt;br&gt;
}&lt;br&gt;
// by doing this if we send data in name and age in different type than if will console an error . we can also add isRequired so that if we use the prop in anywhere but the data is not send via prop then it will console an error we can use this like that&lt;br&gt;
name: PropTypes.string.isRequired,&lt;br&gt;
// we can also check the node, elemet etc here &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State-props&lt;/strong&gt;&lt;br&gt;
The state is used for managing data we can keep our data in the state we can update the data or modify the data, and the state is internal and is controlled by itself. States control the internal data changes. In react we can use or make a state in functional component using the useState hook. Props are used to send data from one component to another component. Props are external and controlled by anything that renders the component. we can’t modify the props it is only readable which means we can only read it we can’t make any change to it.&lt;br&gt;
import React, { useState } from 'react';&lt;br&gt;
const FunctionalComponent = (props) =&amp;gt; {&lt;br&gt;
    const [texts, setTexts] = useState('');&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;h1&gt;hello there {props.name}&lt;/h1&gt;
&lt;br&gt;
    )&lt;br&gt;
}&lt;br&gt;
// this is the way to make a state in functyional component&lt;br&gt;
// and we can use the props like that. and it should be send the data from another component otherwise we cant get the value

&lt;p&gt;// this is the way to make a state in functyional component&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JSX&lt;/strong&gt;&lt;br&gt;
The full form of JSX is Javascript XML. It allows us to write the HTML directly but it’s not HTML. It looks like HTML and gets transformed to Javascript using Babel.JSX makes the development and debugging process very easy and handy. Here is an example how we can write JSX in our react app.&lt;br&gt;
import React from 'react';&lt;br&gt;
const Home = () =&amp;gt; {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;br&gt;
            &lt;h1&gt;Hello world&lt;/h1&gt;
&lt;br&gt;
            &lt;p&gt;Hello There This is an peragraph tag&lt;/p&gt;
&lt;br&gt;
        &lt;br&gt;
    )&lt;br&gt;
}&lt;br&gt;
// This is JSX its look like HTML but its not HTML it will be transfromed to this via babel&lt;br&gt;
React.createElement("div", null, /&lt;em&gt;#&lt;strong&gt;PURE&lt;/strong&gt;&lt;/em&gt;/React.createElement("h1", null, "Hello world"), /&lt;em&gt;#&lt;strong&gt;PURE&lt;/strong&gt;&lt;/em&gt;/React.createElement("p", null, "Hello There This is an peragraph tag"));

&lt;p&gt;&lt;strong&gt;Component Lifecycle&lt;/strong&gt;&lt;br&gt;
The lifecycle of a react component means the groups of methods that are invoked in a different stage of the component’s existence. Each component in React has a lifecycle that goes through three main phases Mounting, Updating, and Unmounting. When the components are mounted on the DOM (birth). They grow by updating and then unmount on DOM (death) this is the React component lifecycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hooks&lt;/strong&gt;&lt;br&gt;
Hooks allow us to make a hook with the react state, lifecycle features using the functional component. React functional components allow us to use the hooks because the Class components are no longer needed and the hooks replace the class component. There are multiple hooks available in react library such as useState, useEffect, useReducer, useRef, useContext, useMemo, useCallbeck, etc. We can also make our own hooks to reuse our code. The most used hooks are useState by using this we can manage our state in a component used can also share the state using props. useEffect this hook is used for making or doing the side effects in a component,  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;custom hooks&lt;/strong&gt;&lt;br&gt;
Custom hooks are just a Javascript function created to reuse the stateful logic. We can create multiple custom hooks for our components to reuse them &lt;br&gt;
import React, { useState, useEffect } from 'react';&lt;br&gt;
export const useData = () =&amp;gt; {&lt;br&gt;
    const [allData, setALlData] = useState([]);&lt;br&gt;
    useEffect(() =&amp;gt; {&lt;br&gt;
        fetch('&lt;a href="https://heroku/amateur-pgotograpger'"&gt;https://heroku/amateur-pgotograpger'&lt;/a&gt;)&lt;br&gt;
            .then(response =&amp;gt; response.json())&lt;br&gt;
            .then(data =&amp;gt; setALlData(data))&lt;br&gt;
    }, []);&lt;br&gt;
    return {&lt;br&gt;
        allData,&lt;br&gt;
        setALlData&lt;br&gt;
    }&lt;br&gt;
}&lt;br&gt;
//this is an example of custom hook we can make multiple of hooks like that to reuse them in our multiple componenets&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;context API&lt;/strong&gt;&lt;br&gt;
Context API provides a way to pass data through components without doing the prop drilling. It allows us to make global variables, and we can call them or use them where we want using use context. In react component state if we want to share the state we can only share the state from parent to the child or if we want to share the state in multiple components then we have to do the lifting the state up and we have to send the data using the prop dilling which is not good for our web app. But using the context API we don’t need to do the prop dilling to pass data we can call the state using the context API hook use context then we can use the state. To create a context API&lt;br&gt;
 we need the createContext hook and to use that we need useContext.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Virtual DOM and diffing- algorithm&lt;/strong&gt;&lt;br&gt;
A virtual DOM is a lightweight Javascript representation of the real DOM. It has the same properties as real DOM. But the real DOM manipulating is slow whereas the virtual DOM manipulating is much faster than that Because by using the virtual DOM, we can find out what is changed and with that, we can apply only those changes to real DOM instead of replacing the entire DOM. And the diff algorithm compares two sequences and finds out the changes after that it updates the real DOM.&lt;/p&gt;

</description>
      <category>react</category>
      <category>programming</category>
    </item>
    <item>
      <title>About some Javascript topics</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Wed, 22 Dec 2021 17:19:00 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/about-some-javascript-topics-5d8n</link>
      <guid>https://forem.com/thekawsarhossain/about-some-javascript-topics-5d8n</guid>
      <description>&lt;p&gt;Overview: Today in this article we will go to know about some topics that are used most in Javascript but we don’t know what actually is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Null Vs Undefined&lt;/strong&gt;&lt;br&gt;
The difference between null and undefined is null is an assignment value that means we have to assign it, which basically means it’s blank. Whereas undefined means that the variable has been declared but its value isn’t assigned yet Undefined and null are two different types undefined is a type itself(undefined) in contrast null is an object. Here is an example:&lt;br&gt;
let undifinedValue&lt;br&gt;
let nullValue = null&lt;br&gt;
console.log(undifinedValue, nullValue)&lt;br&gt;
// and here the first one answer will be undefined and the second one is null the first one is undefined because we initialize the variable but we are not assign any value that's why its undefined and the second one is null because we assigned it as a null value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;double equal (==) vs triple equal (===)&lt;/strong&gt;&lt;br&gt;
The double and triple equal is used to compare two variables. The “==” double equal is only checked quality in value, in contrast, the “===” triple equal strictly checks the quality in the values as well as in the type of the variables. Here is an example:&lt;br&gt;
const one = 10;&lt;br&gt;
const two = '10';&lt;br&gt;
console.log(one == two)&lt;br&gt;
// Here the answer will be true because == equal is only check the value it does not check the type of the value&lt;br&gt;
console.log(one === two)&lt;br&gt;
// and here the answer will be false because === equal check the value of the variables and as well as the type of the variable&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;implicit conversion&lt;/strong&gt;&lt;br&gt;
Implicit Conversion is also known as 'automatic type conversion' that means it will automatically change the type of the value when it will be needed. Here is an example of implicit conversion&lt;br&gt;
const one = 10;&lt;br&gt;
const two = '10';&lt;br&gt;
console.log(one == two)&lt;br&gt;
// Here the answer will be true because == equal is only check the value, but here the varibale named two which is a string type but here the inplicit corection us used it automaticlly change the type of the variable to the number and show the output true&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closure&lt;/strong&gt;&lt;br&gt;
A closure is a function that has access to the variable from another function’s scope. The closure is created every time when a function is created. To use the closure we have to define a function inside another function and expose it. The inner functions will have the access to the variable outer function that’s how the closure works.&lt;/p&gt;

&lt;p&gt;function makeClosure() {&lt;br&gt;
    const text = 'Hello world';&lt;br&gt;
    function child() {&lt;br&gt;
        console.log(text) // parent element&lt;br&gt;
    }&lt;br&gt;
    return child&lt;br&gt;
}&lt;br&gt;
const myFunc = makeClosure();&lt;br&gt;
myFunc()&lt;br&gt;
// this is an example of an closure that how it cann access the parent elemnets&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;&lt;br&gt;
Encapsulation is the process of combining data and functions into a single unit called class. In Encapsulation, the data is not accessed directly access to that data because the data is restricted from outside the class. This process is used for or the class is used for making the data restricted because if we write code more than 500 lines or less than that and if we make a variable that already exists then it will be conflict and gives an error to prevent them we use this class to make the data restricted. By using this we can make the same name variable but the variables and functions are will be only available on the unit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;bind, call, and apply&lt;/strong&gt;&lt;br&gt;
The bind() method allows an object to borrow a method from another object without making a copy of that method. The bind method creates a new function and sets the “this” keyword to the specified object. The call() allows for a function/method belonging to one object to be assigned and called for a different object. The call method sets the “this” inside the function and immediately executes that in the function. The apply method is a little bit the same as to call method. The difference is that the apply method accepts an array of arguments instead of comma-separated values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prototypical inheritance&lt;/strong&gt;&lt;br&gt;
The Prototypal Inheritance is a feature in javascript used to add methods and properties to objects. The prototypical inheritance refers to the ability to access object properties from another object we can inherit the properties, methods, from another object using this prototypical inheritance. That means we can make methods in objects and we can inherit the properties from the object in our method&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Event bubble, Event delegate, and purpose of Event bubble&lt;/strong&gt;&lt;br&gt;
Event bubbling is a method of event outreach in the HTML DOM API. Event Delegation is primarily a pattern to handle events efficiently. Rather than adding an event listener to each and every similar element, we can add an event listener to a parent element and call an event on a special target using the target property of the event object. And we can access all the elements without adding the listener to them all and we can access of modify them &lt;br&gt;
document.querySelector('#container').addEventListener('click', (e) =&amp;gt; {&lt;br&gt;
    console.log(e.target.class)&lt;br&gt;
})&lt;br&gt;
// using this target we can select the inner elements&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is DOM (Document Object Model)&lt;/strong&gt;&lt;br&gt;
DOM basically stands for document Document Object Model. It’s a programming interface that allows us to create, change or remove elements from a document. It also allows us to add events on these elements to make our webpage more interactive and dynamic. using this DOM we can change the HTML document using Javascript Here is an example: &lt;br&gt;
document.getElementById('container').addEventListener('click', () =&amp;gt; {&lt;br&gt;
    const button = document.getElementById('button');&lt;br&gt;
    button.innerText= 'hello world'&lt;br&gt;
})&lt;br&gt;
// here is an simple example that how we can select document elements and we can change here&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an API, the purpose of API, GET, POST&lt;/strong&gt;&lt;br&gt;
Well API stands for the application programming interface, it is a software intermediary that allows two applications to talk to each other. We can send our data to the server using API we can get the data etc we can do it with API. Get, using this get method in API we can request to the server for our required data. Post, this method is used to send the data to the server. &lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>About some CSS topics</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Mon, 20 Dec 2021 17:18:31 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/about-some-css-topics-2cf</link>
      <guid>https://forem.com/thekawsarhossain/about-some-css-topics-2cf</guid>
      <description>&lt;p&gt;Overview: So Today we will going to discuss some CSS properties which are advanced and not usually used frequently like other properties. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Float:&lt;/strong&gt; The CSS float property is used to align the items to the left, right. That means we can create a simple layout using float. Nowadays float property isn’t used by the developers. Float property values are left, right and none using the default value is none we can align the element to the right using right and if we want if the element start’s in right then we can align them left if we want and we can also use the none value for removing the left, right value. When we use the float property sometimes we need the clear property as well because when we use the float property some elements are overlapped in other elements that are we need to use this clear property. In clear property set the value to left, right and both that means of the element overlapped on the left side then we can use the left value and if right then we can use the right value and if we need then we can add both values which will clear the overlapping from left and right as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Animation:&lt;/strong&gt;  We can make an animation to use in our webpage using CSS animation. To make animation we have to use the @keyframes this property. And here we can make different kinds of animation make first we have to define an animation-name so that we can call it where we need it. We can make animation in keyframes using from and to or using the units like %, pixel. We can use the animation where we want in CSS to call the animation we have to use the animation-name property, we can also more animation properties like animation-duration, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, animation-fill-mode, animation-play-state. And these properties have multiple values we can use all these properties in shorthand using only animation property.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Variable: *&lt;/em&gt; we can make variables in CSS and these variables have access to the DOM, and CSS variables are can be global or local scope. To make a global variable in CSS what we have to do is we have to declare the variable inside the :root{} inside this we have to declare the variable using – two dashes like this  root{–color: #ffffff;} and we have to use these variables using var(variable name) like this h2{background-color:var(--color)} the advantage of variable in CSS are it makes code easier to read and if we need any changes then we don’t need to change everywhere we can simply change the variable value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Empty-cells:&lt;/strong&gt; using empty-cell we can hide the cell border and background in the table. It tells the browser not to draw the borders around the table cell. The empty-cell property has two values shown and hides the default value is shown which means it will show the border whether the value is available or not and if we use the value hide the border will be hidden.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Resize: *&lt;/em&gt; Using resize property we can set elements to resizable or in which direction. The default value of resize property is none. We can make the element resizeable from both sides using both values and the user will be able to make or resize the width and the height of the element. We can also make horizontal or vertical using the horizontal and vertical value in horizontal user can resize the element width and the vertical the user can be able to resize the height of the element. We can also use the value initial and inherit &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tab-size:&lt;/strong&gt; The tab-size property mark the width of the tab character like if we add the value of tab-size 4 then it will take the width of 4 tab size. The tab character is usually displayed as a single space character, except for some elements like textarea, pre.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;White-space:&lt;/strong&gt; The white-space property is used to set the space inside an element, and it helps to control the line breaks, space within the element’s text. In white space, we can set the value to nowrap, normal, and pre, and the normal value is the default. If we use nowrap then our content will go out of the screen and the screen will be scrollable which is not responsive for mobile. And if we use the pre then the content/text will be aligned line depending on the screen.&lt;/p&gt;

</description>
      <category>css</category>
    </item>
    <item>
      <title>#100daysofcode [day 12]</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Sun, 26 Sep 2021 20:33:49 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/100daysofcode-day-12-5dj</link>
      <guid>https://forem.com/thekawsarhossain/100daysofcode-day-12-5dj</guid>
      <description>&lt;p&gt;Hey There, the last few days I was learning React JS. and this is the twelve day's post of 100 days coding challenge,&lt;/p&gt;

&lt;p&gt;today I make a simple site using React JS .&lt;/p&gt;

&lt;p&gt;Here is the Live site: &lt;a href="https://online-pc-builder-100days.netlify.app/"&gt;https://online-pc-builder-100days.netlify.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the code link: &lt;a href="https://github.com/thekawsarhossain/100-days-of-code/tree/main/day%2012/online-pc-builder"&gt;https://github.com/thekawsarhossain/100-days-of-code/tree/main/day%2012/online-pc-builder&lt;/a&gt; &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>#100daysofcode [Day 11]</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Sat, 18 Sep 2021 18:16:14 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/100daysofcode-day-11-40cl</link>
      <guid>https://forem.com/thekawsarhossain/100daysofcode-day-11-40cl</guid>
      <description>&lt;p&gt;Hey Guys, Today is the eleventh day of my 100 days coding challenge , I can't upload the progress of my 100 days of coding just because of my programming course classes , But I always try to keep this challenge.And today i make one of the best site that i've ever made . it's an bank site where you can sign up after that you can login , you can deposit as well as you can withdraw , to make this site I used html , css, bootstrap , js and LocalStorage.&lt;br&gt;
Here is the live site : &lt;a href="https://lnkd.in/gggu8mZZ"&gt;https://lnkd.in/gggu8mZZ&lt;/a&gt;&lt;br&gt;
and here is the code link :&lt;a href="https://lnkd.in/gvjHD5Eb"&gt;https://lnkd.in/gvjHD5Eb&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>#100daysofcode [Day 10]</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Thu, 09 Sep 2021 21:12:42 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/100daysofcode-day-10-2d2</link>
      <guid>https://forem.com/thekawsarhossain/100daysofcode-day-10-2d2</guid>
      <description>&lt;p&gt;Hey There , Today is the tenth day of 100 days coding challenge ! And Today i tried to know more about local storage and session Storage. and i make this site, here if you add items in this site and do refresh the browser, the items of this site will still remain in this site/page .&lt;br&gt;
code Link : &lt;a href="https://lnkd.in/gherj5t6"&gt;https://lnkd.in/gherj5t6&lt;/a&gt;&lt;br&gt;
Live Site : &lt;a href="https://lnkd.in/gQwgWkRM"&gt;https://lnkd.in/gQwgWkRM&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>#100DaysOfCode [ Day 09]</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Sat, 04 Sep 2021 22:04:01 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/100daysofcode-day-09-30dk</link>
      <guid>https://forem.com/thekawsarhossain/100daysofcode-day-09-30dk</guid>
      <description>&lt;p&gt;Hey There , Today is the nineth day of my 100 days coding challenge and today i just go back to vanila css and tried a simple just  to recap the css thats all .&lt;br&gt;
Here is the live site : &lt;a href="https://lnkd.in/gbqqSsk6"&gt;https://lnkd.in/gbqqSsk6&lt;/a&gt;&lt;br&gt;
code link : &lt;a href="https://lnkd.in/g9mRbucd"&gt;https://lnkd.in/g9mRbucd&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>#100daysofcode [Day - 08]</title>
      <dc:creator>Kawsar Hossain</dc:creator>
      <pubDate>Thu, 02 Sep 2021 14:30:26 +0000</pubDate>
      <link>https://forem.com/thekawsarhossain/100daysofcode-day-08-4h0j</link>
      <guid>https://forem.com/thekawsarhossain/100daysofcode-day-08-4h0j</guid>
      <description>&lt;p&gt;Hey guys! today is the eighth day of my 100 days coding challenge and today i tryed to make site using api .&lt;br&gt;
here is the live site : &lt;a href="https://lnkd.in/gVZF34cv"&gt;https://lnkd.in/gVZF34cv&lt;/a&gt;&lt;br&gt;
and code link is : &lt;a href="https://lnkd.in/guFKMxSr"&gt;https://lnkd.in/guFKMxSr&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>github</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
