<?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: Farihaakter</title>
    <description>The latest articles on DEV Community by Farihaakter (@fariha).</description>
    <link>https://dev.to/fariha</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%2F625897%2Fa3e87fa2-d70f-409f-b56c-e5e92a164204.png</url>
      <title>DEV Community: Farihaakter</title>
      <link>https://dev.to/fariha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fariha"/>
    <language>en</language>
    <item>
      <title>JavaScript Interview Questions</title>
      <dc:creator>Farihaakter</dc:creator>
      <pubDate>Sat, 08 May 2021 17:46:18 +0000</pubDate>
      <link>https://dev.to/fariha/javascript-interview-questions-480g</link>
      <guid>https://dev.to/fariha/javascript-interview-questions-480g</guid>
      <description>&lt;h1&gt;
  
  
  1. Truthy and Falsy value:
&lt;/h1&gt;

&lt;p&gt;JavaScript has truthy and falsy value. They are called boolean in JS. When the value of a variables in javascript is &lt;code&gt;null&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;, &lt;code&gt;-0&lt;/code&gt;, then this values are called falsy.&lt;br&gt;
Again when the value of a variable is &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;{}&lt;/code&gt;, &lt;code&gt;[]&lt;/code&gt;, &lt;code&gt;" "&lt;/code&gt;, &lt;code&gt;12&lt;/code&gt; are all truthy value.&lt;/p&gt;
&lt;h1&gt;
  
  
  2.Null vs Undefined:
&lt;/h1&gt;

&lt;p&gt;Null is an empty value while undefined is a variable that is declared but never assigned a value. When a variable is declared but no value is assigned to it then it returns undefined when called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// gives undefined in return&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// null&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  3. Double-Equal and Triple-Equal:
&lt;/h1&gt;

&lt;p&gt;Both double equal and triple equal is used in JS. Both are value comparison operation in JS. &lt;br&gt;
The double equal compares the values of two variables after converting them to a common type. It does not compare the type of the values. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// will return true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While triple equal compares both the type and the value of a variables. If the values are not the same type then the values are considered unequal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;// will return true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  4. Global scope and Block scope:
&lt;/h1&gt;

&lt;p&gt;In JavaScript, scope determines the accessibility of a variable.&lt;br&gt;
javascript has two types of scope:&lt;/p&gt;
&lt;h3&gt;
  
  
  Global scope
&lt;/h3&gt;
&lt;h3&gt;
  
  
  Local scope
&lt;/h3&gt;

&lt;p&gt;Variables that are declared inside a function are only accessible from that function it is defined. They are local or block scope variables in JS.&lt;br&gt;
On the other hand the variables that are defined outside of a function are became GLOBAL variables. They are accessible from anywhere.&lt;/p&gt;
&lt;h1&gt;
  
  
  5. Bind, Call, Apply:
&lt;/h1&gt;

&lt;p&gt;Bind method creates a new function when called. It takes the function property of an object and bind it to the new object. So the new object can execute the code inside of that function.&lt;/p&gt;

&lt;p&gt;Call method can be used to get a method of another object. Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lastName&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;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;person1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fariha&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="na"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Aktar&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// Will return "Fariha Aktar"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;apply method is similar to call method. The apply method takes arguments as an array. apply nmethod is used when you want to use arguments as an array.&lt;/p&gt;

&lt;h1&gt;
  
  
  6.setTimeout, setInterval:
&lt;/h1&gt;

&lt;p&gt;setTimeout() methods calls a function after a specific number of millisecond. &lt;br&gt;
setInterval() is similar to setTimeout(). setInterval is used when you want to repeat the execution method of a function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  7. What is JavaScript:
&lt;/h1&gt;

&lt;p&gt;JavaScript is a high level programming language that is used in modern web pages. It is used for both client and server side website. Most of the websites are build with JS in this modern age. It supports event-driven, functional, object-oriented, and prototype-based programming styles.&lt;/p&gt;

&lt;h1&gt;
  
  
  8. Features of JS:
&lt;/h1&gt;

&lt;p&gt;The main features of JS is given below:&lt;/p&gt;

&lt;h3&gt;
  
  
  DOM manipulation:
&lt;/h3&gt;

&lt;p&gt;The most amazing features of JS is DOM manipulation. In the early years DOM were static. but after javascript DOM became dynamic.&lt;/p&gt;

&lt;h3&gt;
  
  
  Functions as first class object:
&lt;/h3&gt;

&lt;p&gt;In JS, functions are used as objects. It can have methods and properties just like any other objects. It also can pass as an arguments to another function.&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript as a Client-Side Language:
&lt;/h3&gt;

&lt;p&gt;JS can be used as a client side language. Developers don't have to learn any other language for server side.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Syntax is Similar to Java:
&lt;/h3&gt;

&lt;p&gt;JavaScript has similar syntax as java. It makes things easier for developers to work with JS.&lt;/p&gt;

&lt;h1&gt;
  
  
  9. How javascript code executes:
&lt;/h1&gt;

&lt;p&gt;Javascript code is executed in two phases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory creation:
&lt;/h3&gt;

&lt;p&gt;In this phase, JS allocates all the variables and functions in a program. &lt;/p&gt;

&lt;h3&gt;
  
  
  Code execution phase:
&lt;/h3&gt;

&lt;p&gt;In this phase, JS first executes main. then Js runs the code line by line&lt;/p&gt;

&lt;h1&gt;
  
  
  10.What is DOM :
&lt;/h1&gt;

&lt;p&gt;DOM represent a page in a web. Programmers can manipulate its structure, style and content. A web page is a document. This document can be displayed in a web browser or as the HTML source.&lt;br&gt;
The DOM represents that same document.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React</title>
      <dc:creator>Farihaakter</dc:creator>
      <pubDate>Fri, 07 May 2021 16:17:58 +0000</pubDate>
      <link>https://dev.to/fariha/react-14lp</link>
      <guid>https://dev.to/fariha/react-14lp</guid>
      <description>&lt;h1&gt;
  
  
  1.React:
&lt;/h1&gt;

&lt;p&gt;React is a JavaScript library for building user interfaces.&lt;br&gt;
React follows the Unix philosophy because it is a small library that focuses only one thing. That "one thing" is building user interfaces.&lt;br&gt;
A user interface(UI) is a thing that put in front of users to have them interact with a machine. Though JavaScript, we can use React to describe Web UIs.&lt;br&gt;
The most popular thing in react is that it uses virtual DOM that can be used to reconcile the actual DOM. DOM is &lt;code&gt;Document Object Model&lt;/code&gt;. It's the browsers' programming interface for HTML. The DOM API is used to change a document structure, style, and content.&lt;/p&gt;
&lt;h1&gt;
  
  
  2.React's tree reconciliation:
&lt;/h1&gt;

&lt;p&gt;when React renders a tree of elements in the browser, it first generates a virtual representation of that tree and keeps it in its memory for later. When we tell react to update the tree of elements it previously rendered, it generates a new virtual representation of the updated tree. It will compare the the two versions of the tree that it has in memory and compute the difference between them and update only the changes. This process is known as the tree reconciliation algorithm.&lt;/p&gt;
&lt;h1&gt;
  
  
  3. React Components:
&lt;/h1&gt;

&lt;p&gt;In react, components are used to describe UIs. React components are reusable, composable and stateful.&lt;br&gt;
The basic form of a react component is a plain-old javascript function. Functions are reusable and they can be used in another functions.&lt;br&gt;
When the state of a React component changes, its output changes as well. React component's name has to start with a capital letter.&lt;/p&gt;
&lt;h1&gt;
  
  
  4.JSX:
&lt;/h1&gt;

&lt;p&gt;JSX is a JavaScript extension that is a representation of React's tree of objects. JSX uses syntax that are similar to HTML template. In React application we use JSX.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before being used in the browser, gets translated to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;div&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nx"&gt;array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;div&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&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;React takes this tree of objects and transforms it into a tree of DOM elements.&lt;/p&gt;

&lt;h1&gt;
  
  
  5.React Hooks:
&lt;/h1&gt;

&lt;p&gt;A hook is a call to a special function in a component. all hooks begins with the word "use". They are many usefull things that we can do with react hooks.&lt;br&gt;
React hooks can only be used in function components.There are many hooks like: useState, useEffect, useCallBack.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;Hook&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;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;h1&gt;
  
  
  6.Virtual-DOM:
&lt;/h1&gt;

&lt;p&gt;Document Object Model or DOM is a representation of a tree structure. Any changes in a DOM can make the DOM re-painted which can make your app work slow.&lt;br&gt;
Virtual-DOM reduces this problem by minimizing these two stages and give a better performance in a complex app. when an element changes in DOM, all the elements again created in the Virtual-DOM.&lt;br&gt;
It will check if any changes is made in a component. Only changed element will be updated in the actual DOM. &lt;/p&gt;

&lt;h1&gt;
  
  
  7.Separate the concerns:
&lt;/h1&gt;

&lt;p&gt;In react, you can put HTML, CSS, JStogether as a component. For many years, we split JS, CSS, HTMl in different files. And it shouldn't be confused with separation of concerns.&lt;/p&gt;

&lt;h1&gt;
  
  
  8.Data goes down:
&lt;/h1&gt;

&lt;p&gt;In react, data goes down the tree of the components. For this reason, when a data is passed from parent to child component you need to use props. From JSX point of view props are HTML attributes.&lt;/p&gt;

&lt;h1&gt;
  
  
  9.Events go up:
&lt;/h1&gt;

&lt;p&gt;In react, parent component can get data from its child component. let's say a perent component that needs data from the child input box. it will pass down a function as a prop to that child to push some data up. Then the parent component can save the data in its own state or can pass it down to a different components.&lt;/p&gt;

&lt;h1&gt;
  
  
  10.How rendering works:
&lt;/h1&gt;

&lt;p&gt;Every state change inform react about state changes. Then, react calls render() method to update the components representation in memory and compares it with actual DOM. Then React will only update the changes to the DOM. Child components know that they need to re-render because their props changed. &lt;/p&gt;

</description>
      <category>react</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Web-Developments</title>
      <dc:creator>Farihaakter</dc:creator>
      <pubDate>Thu, 06 May 2021 13:55:17 +0000</pubDate>
      <link>https://dev.to/fariha/web-developments-4cga</link>
      <guid>https://dev.to/fariha/web-developments-4cga</guid>
      <description>&lt;h1&gt;
  
  
  1.Javascrips(Types of value):
&lt;/h1&gt;

&lt;p&gt;Javascripts has nine types of values. This values are divided into two main categories: &lt;/p&gt;

&lt;h3&gt;
  
  
  Primitive values:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Undefined&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Null&lt;/code&gt;&lt;br&gt;
&lt;code&gt;String&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Numbers&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Booleans&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Symbols&lt;/code&gt;&lt;br&gt;
&lt;code&gt;BigInts&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Objects and Functions:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Objects&lt;/code&gt;&lt;br&gt;
&lt;code&gt;Functions&lt;/code&gt;&lt;br&gt;
All the other fundamentals are called objects like: array, regular expression.The value's type of javascript can be checked using typeof() operator:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;//"number"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  2.Try-Catch:
&lt;/h1&gt;

&lt;p&gt;Errors are the most common phenomenon in programming and if you are a beginner then bless you. You know what i mean. An error can occur for many reasons like we programmers made a mistakes or users put an invalid input and many more But you can handle an error with try-catch method.&lt;br&gt;
When an error occurs a script dies meaning it will stop working and printing it to console. It's totally not good for users experience. That's when try-catch comes into play.&lt;br&gt;
try-catch allows us to catch that error without stopping the script.&lt;br&gt;
The syntax of try-catch is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;//code&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;//error handling&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First the code in try block will execute and if it does not get any error then catch(err) will be ignored and if an error occurs in try block then the try execution will stop and will go to catch block. The error variables will contain an error objects with details about what happened.&lt;/p&gt;

&lt;h1&gt;
  
  
  3. Coding-Style:
&lt;/h1&gt;

&lt;p&gt;Coding style is very important for a programmer. It must be clean and readable so other programmers can read our code. Usually we wright codes for users or a client or other developers. If our code is not readable then it will be troublesome for other developers to reuse or modify the code. &lt;br&gt;
here is a detail info about how to wright code more clean:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://javascript.info/try-catch?fbclid=IwAR3jDTTN00ohtJWi-xv49Pruec7HFFKC3F4u4Es6mZENqd3rxmfTRwvSC-8"&gt;https://javascript.info/try-catch?fbclid=IwAR3jDTTN00ohtJWi-xv49Pruec7HFFKC3F4u4Es6mZENqd3rxmfTRwvSC-8&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  4. Comments:
&lt;/h1&gt;

&lt;p&gt;Comments are used in code to know how the code is working. It is really convenient for both users of the code and the coder himself. When a programmers comes back to his/her project after a while, comments help them why and how this code is written that way.&lt;br&gt;
But its excess use can diminish code's cleanliness and readability. It is important to know when and how we use comments.&lt;br&gt;
Comments has to be minimal and avoid using unnecessary comments.&lt;/p&gt;
&lt;h1&gt;
  
  
  5.Cross Browser Testing:
&lt;/h1&gt;

&lt;p&gt;Cross browser testing is the practice of making sure that the web page or app is working across an acceptable number of web browser.&lt;/p&gt;

&lt;p&gt;It is important that a web page or app is working in different types of browser like Chrome, Firefox, Safari and IE/Edge.&lt;/p&gt;

&lt;p&gt;If your web app has many features like 3D animation or technologies then it might work on smart phone or high tech desktop or popular browsers but does not work on old browsers. That device or browsers has to support that tech to work. It might not even show in that browser. That's why it is really important to use cross browser testing according to your user need. What kind of users you going to target for your web app.&lt;br&gt;
Usually there are four steps to follow when making a web app:&lt;/p&gt;
&lt;h4&gt;
  
  
  Initial planning &amp;gt; Development &amp;gt; Testing &amp;gt; Fixes
&lt;/h4&gt;
&lt;h1&gt;
  
  
  6.Block-Bindings(ES6):
&lt;/h1&gt;

&lt;p&gt;ECMAScript 6 has introduce block level binding to make variable declaration more easy in javascript. Traditionally, the way variable declarations work has been one tricky part of programming in JavaScript. When variables is declared using var, it is treated as global variable. No matter where it is declared in a function it can be accessible from anywhere in that function. This is called Hoisting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="c1"&gt;// x is accessible from here&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;value&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="c1"&gt;// x is accessible from here&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;// x is accessible from here&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  7.Block-Level-Declaration:
&lt;/h1&gt;

&lt;p&gt;Block level declaration are those that declare variables that are not accessible from outside of a block. It has two types of syntax when declaring a block: &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt;. Block scope are created:&lt;br&gt;
1.Inside of a function&lt;br&gt;
2.Inside of a block&lt;/p&gt;
&lt;h1&gt;
  
  
  8.Const vs Let declaration:
&lt;/h1&gt;
&lt;h2&gt;
  
  
  let declaration:
&lt;/h2&gt;

&lt;p&gt;The let declaration syntax is the same as var declaration syntax. let can be used instead of var. The difference between var and let is let is accessible only in the it is declared. Unlike var it is not hoisted in the top of the functons.&lt;/p&gt;
&lt;h2&gt;
  
  
  const declaration:
&lt;/h2&gt;

&lt;p&gt;Variables declared using const are considered constant.&lt;br&gt;
const declaration are similar to let declaration. const variables are not accessible from outside of the block. but constant variables value can not be changed after assigning a value.&lt;/p&gt;
&lt;h1&gt;
  
  
  9.Declaring objects using const:
&lt;/h1&gt;

&lt;p&gt;A const declaration of object prevents modifications of the binding but not the value of the objects.Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;someone&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;//work&lt;/span&gt;
&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;new&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;//throw error&lt;/span&gt;
&lt;span class="nx"&gt;object&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;new&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  10.Functions:
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Default parameters:
&lt;/h2&gt;

&lt;p&gt;Functions with default parameters allows functions to use that value if that value is not pass in the parameters.Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;addition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
   &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;addition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 5&lt;/span&gt;

&lt;span class="nx"&gt;addition&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// 7&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>First Blog</title>
      <dc:creator>Farihaakter</dc:creator>
      <pubDate>Wed, 05 May 2021 15:22:16 +0000</pubDate>
      <link>https://dev.to/fariha/first-blog-2ml7</link>
      <guid>https://dev.to/fariha/first-blog-2ml7</guid>
      <description>&lt;h1&gt;
  
  
  1.Javascript:
&lt;/h1&gt;

&lt;p&gt;javascript is a dynamic language that developers can use to make an interactive website. It is first invented by Brendan Eich in 1995 and It was released in 1996. &lt;br&gt;
Unlike other programming languages javascript is designed to run as a scripting language in a host environment. That is why it is really popular language among developers.&lt;br&gt;
javascript is a versatile language that has built in objects, types, array, methods, operators and function. its syntax is similar to java and C languages.&lt;/p&gt;
&lt;h1&gt;
  
  
  2.Variables:
&lt;/h1&gt;

&lt;p&gt;Javascript variables can have values with different data-types. like: string, number, boolean, array and objects.&lt;br&gt;
javascript uses one of three keywords when declaring a variable. This are: let, const and var.&lt;/p&gt;
&lt;h3&gt;
  
  
  let:
&lt;/h3&gt;

&lt;p&gt;let is a block level variable that is available from the block it is declared.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function example(){&lt;br&gt;
//it's not accessible from here&lt;br&gt;
  for(let i = 0, i &amp;lt; 5, i++){&lt;br&gt;
     //accessible&lt;br&gt;
}&lt;br&gt;
//it's not accessible from here&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  const:
&lt;/h3&gt;

&lt;p&gt;const is a static variable which value can't be changed. it is available from the block it is declared.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const a = 2; //value is set&lt;br&gt;
a = 50; // will throw an error&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  var:
&lt;/h3&gt;

&lt;p&gt;var is the most common keyword in javascript. 'var' declared variables can be accessible from anywhere in the function. So it can cause problem in future. It is preferable to use let or const rather than var. Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function example(){&lt;br&gt;
//var is visible in here&lt;br&gt;
for(var i = 0, i &amp;lt;5, i++){&lt;br&gt;
//accessible from here&lt;br&gt;
}&lt;br&gt;
// also accessible from here&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  3.Operators:
&lt;/h1&gt;

&lt;p&gt;In javascript there are operators called numeric operator like &lt;code&gt;+&lt;/code&gt; ,&lt;code&gt;-&lt;/code&gt; ,&lt;code&gt;*&lt;/code&gt; ,&lt;code&gt;/&lt;/code&gt; ,&lt;code&gt;%&lt;/code&gt;. There are also assignment operator &lt;code&gt;=&lt;/code&gt; and comparison operators &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;. Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let a = 1 + 2;&lt;br&gt;
let b = 5 - 1;&lt;br&gt;
let c = 2 * 1;&lt;br&gt;
let d = 9 / 3;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  4.Conditionals:
&lt;/h1&gt;

&lt;p&gt;Conditionals are structures that are made to look whether a statement is true or false. If the statement is true then the function is executed. If and else are two conditionals in javascript.&lt;/p&gt;

&lt;h1&gt;
  
  
  5.Objects:
&lt;/h1&gt;

&lt;p&gt;Objects are collection of name and value pairs. It's similar to dictionary in python. In js, objects are declared in two ways:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var object = new Object();&lt;br&gt;
var object = {};&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;The object's value can be accessible by calling its name attribute:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let object = {name:'s', age: 24};&lt;br&gt;
console.log(object.name);&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Once created, the exist properties of an object can be changed in this way:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;onject.name = 'x'&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  6.Arrays:
&lt;/h1&gt;

&lt;p&gt;Arrays are another type of object in javascript. Arrays are created in this manner:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let x = new Array();&lt;br&gt;
x[0] = 1;&lt;br&gt;
x[1] = 2;&lt;br&gt;
x[2] = 3;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;If an array is empty, the value of an array will be undefined. arrays are iterable using loops.&lt;/p&gt;

&lt;h1&gt;
  
  
  7.Functions:
&lt;/h1&gt;

&lt;p&gt;Functions are most used and useful element in a language.&lt;br&gt;
It reduces the repetition of the same code. Functions have to be defined before it is called and it can called as many times as you want. Example of a function:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function example(x,y){&lt;br&gt;
return x + y;&lt;br&gt;
}&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;In javascript, functions can take 0 to more arguments. Functions can be declared in another function definition.&lt;/p&gt;

&lt;h1&gt;
  
  
  8.Strings:
&lt;/h1&gt;

&lt;p&gt;Strings are types that holds data in a text form. There are may built in methods in js that are used in string to manipulate its value.&lt;br&gt;
Some of them are described bellow:&lt;/p&gt;
&lt;h4&gt;
  
  
  endsWith():
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;endsWith()&lt;/code&gt; method determines whether a string ends with the characters of a specified string:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const str = 'value';&lt;br&gt;
console.log(str.endsWith('e')); // returning the value true&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  includes():
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;includes()&lt;/code&gt; method determines whether a string is present in another string:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const str = 'hello world';&lt;br&gt;
const word = 'hello';&lt;br&gt;
console.log(str.includes(word))// return true&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  indexOf():
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;indexOf()&lt;/code&gt; method returns the index value of a string from a specified string. It returns the first index it can find of that calling string object. If it does not find the string it will return &lt;code&gt;-1&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  slice():
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;slice()&lt;/code&gt; method returns a extracted string of a specified string without modifying the original string.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const str = 'The cat';&lt;br&gt;
console.log(str.slice(3))// expected output cat&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  9.Number:
&lt;/h1&gt;

&lt;p&gt;javascript has two built in numeric types: Number and BigInt.&lt;br&gt;
There are many built in methods that are present in numbers.&lt;/p&gt;

&lt;h1&gt;
  
  
  10.SSL:
&lt;/h1&gt;

&lt;p&gt;When we go to a website, we see two types of URL &lt;code&gt;http://&lt;/code&gt; and &lt;code&gt;https://&lt;/code&gt;. It is necessary to have that extra &lt;code&gt;s&lt;/code&gt; to secure a website. When we fill a form giving personal information like email or bills. It is important to know that our information is secured and does not go to any other person. That extra &lt;code&gt;s&lt;/code&gt; give us that security that we want. It's called SSL which stands for &lt;code&gt;Secure Sockets Layer&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>objects</category>
      <category>array</category>
      <category>ssl</category>
    </item>
  </channel>
</rss>
