<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shakil Chowdhury on Medium]]></title>
        <description><![CDATA[Stories by Shakil Chowdhury on Medium]]></description>
        <link>https://medium.com/@shakil2chowdhury?source=rss-5a95d7baf81d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Fa2QsJMSFyfzUoxH</url>
            <title>Stories by Shakil Chowdhury on Medium</title>
            <link>https://medium.com/@shakil2chowdhury?source=rss-5a95d7baf81d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 02:45:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shakil2chowdhury/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JAVASCRIPT BASICS — IMPORTANT FOR INTERVIEW QUESTIONS]]></title>
            <link>https://shakil2chowdhury.medium.com/javascript-basics-important-for-interview-questions-4fb1922e35a?source=rss-5a95d7baf81d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fb1922e35a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript-basics]]></category>
            <dc:creator><![CDATA[Shakil Chowdhury]]></dc:creator>
            <pubDate>Sat, 08 May 2021 12:03:17 GMT</pubDate>
            <atom:updated>2021-05-08T12:03:17.925Z</atom:updated>
            <content:encoded><![CDATA[<h3>JAVASCRIPT BASICS — IMPORTANT FOR INTERVIEW QUESTIONS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*NeR6FwX5PydIKR0-ONKIcQ.png" /><figcaption>LET VS VAR</figcaption></figure><p><strong>NULL Vs Undefined</strong></p><p>We know that JavaScript has two values for nothing. Which are Null and Undefined.</p><p>But there is a difference between null and undefined values.</p><p>Undefined means the variable is not defined.</p><p>Undefined is not a keyword. Undefined is a type that exactly got one value named Undefined.</p><p>Null means not existing value. Null is used by coders to indicate no values. We can assign null to a variable. And it will return null it&#39;s not an object it’s a primitive value.</p><p><strong>Double Equal == Vs === Triple Equal</strong></p><p>At first == is used for comparing two variables but it doesn’t check the data types.</p><p>And === checks the data types and compares two values also.</p><p><strong>Truthy And Falsy Values</strong></p><p>At first, we have known about the falsy value of JavaScript.</p><p>The falsy values are: -</p><p>o 0 — (Zero)</p><p>o False</p><p>o ‘’ or “ — (Empty String)</p><p>o undefined</p><p>o null</p><p>o NaN</p><p>Except for these values, everything is truthy values.</p><p><strong>Scope Block Scope Function Scope</strong></p><p>Think simple scope is an area that’s it.</p><p>Now sometimes we can see some people cannot access to the restricted areas and some people can access to all the areas.</p><p>Now think of those peoples as variables or functions etc.</p><p>Now, let&#39;s think about the Global scope. The variables which are declared in the global scope can be accessed by all the functions and components etc.</p><p>Then the Block scope concept is a specific area within loops, conditions, functions, etc. Those variables declared in the block scope cannot be accessed from the outside of the block.</p><p>Function Scope concept is that in every function there is always a scope for doing its process. The variables of function scope cannot be accessed outside of the scope.</p><p><strong>DOCUMENT OBJECT MODEL</strong></p><p>Every developer should know about this DOM property.</p><p>It mainly represents the objects and the structure of a document on the web.</p><p>It represents all HTML or XML documents in the memory.</p><p>It represents the page so that programs can access this and change document structure, style, and content.</p><p>These are the simple basics of DOM.</p><p><strong>Difference between Bind, Call, Apply in JavaScript.</strong></p><p>At first, know that the call() and apply() use for the same purpose.</p><p>A call allows users to pass in arguments one by one by invoking the function.</p><p>Apply allows use to pass in arguments as an array by invoking the function.</p><p>And the bind() allows passing in an array or any number by returning a new function.</p><p><strong>this Keyword In JavaScript</strong></p><p>Mainly this keyword in JavaScript refers to the object it belongs to.</p><p>It has many different values depending on where it has been used.</p><p>So the easy answer for this keyword in JavaScript is:-</p><p>This keyword mainly refers to the current object in a method or constructor.</p><p><strong>Closure in JavaScript</strong></p><p>The closure is a nice feature of JavaScript where the inner function has the access to the outer function variables.</p><p>There are three scope chain enclosures.</p><p>1. it can access its own scope</p><p>2. it can access its outer function’s variable</p><p>3. it can access global variables.</p><p><strong>Encapsulation in JavaScript</strong></p><p>An easy way of thinking, encapsulation is the way to information hiding by this way we can restrict internal entities so that they cannot be accessed liked public entity.</p><p>And in JavaScript, it is a process of binding the data with the functions which will act upon the data.</p><p>So the main thing is by Encapsulation we can control and validate the data.</p><p><strong>Let vs Var in JavaScript</strong></p><p>Sometimes we can see that why to Let and Var are different in JavaScript. We have researched for many answers but many of them are so complex answers. So here we will learn a clear-cut easy answer to the difference between let and var in JavaScript.</p><p>The main difference is based on the scoping.</p><p>var mainly scoped to immediate function body and let are scoped to immediate scoping block. ( Block denoted by {} )</p><p>let does not create a global object but var is globally scoped.</p><p>We can redeclare var in the same scope multiple times but we cannot redeclare let variable in the same scope multiple times.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fb1922e35a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Some fundamentals of React JS]]></title>
            <link>https://shakil2chowdhury.medium.com/some-fundamentals-of-react-js-69a44e5dcfeb?source=rss-5a95d7baf81d------2</link>
            <guid isPermaLink="false">https://medium.com/p/69a44e5dcfeb</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[basic-react]]></category>
            <dc:creator><![CDATA[Shakil Chowdhury]]></dc:creator>
            <pubDate>Sat, 08 May 2021 07:35:12 GMT</pubDate>
            <atom:updated>2021-05-08T07:35:12.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*HElVxDm46lSxuDSd.png" /><figcaption>Basics</figcaption></figure><p>We know that REACT is based on components. By using react we can reuse the components based on our needs and this is very helpful for creating a nice-looking UI.</p><p>You can make react components by two ways :</p><p>1. Class Components</p><p>2. Functional Components</p><p>Nice! Let&#39;s go through the system of creating React components.</p><p><strong>#Class Components</strong></p><p>For creating a class component in React you have to define a class that will extend the Component class and has a render function.</p><p>By focusing on the example below we can get clear idea about making a react class component.</p><p>Example:</p><p>// NewComponent.js</p><pre>import React, { Component } from ‘react’;</pre><pre>class NewComponent extends Component {</pre><pre>render() {</pre><pre>return (</pre><pre>    &lt;div&gt;This is new component.&lt;/div&gt;</pre><pre>);</pre><pre>}</pre><pre>}</pre><pre>export default NewComponent;</pre><p>Then save it as a NewComponent.js file and then you can access this component by calling from parent components or directly.</p><p><strong>#Functional Components</strong></p><p>Functional Components are the most wanted react component nowadays. Many react developers are fond of it.</p><p>Let&#39;s dive into the code for understanding more</p><p>Example: -</p><p>//NewComponent.js</p><pre>import React from ‘react’</pre><pre>function NewComponent(){</pre><pre>   const newComp = ‘Hello this is new component’</pre><pre>return &lt;h1&gt;{newComp}&lt;/h1&gt;</pre><pre>}</pre><p>export default NewComponent</p><p>This is the way of writing a functional component in React Js.</p><p><strong>#JAVASCRIPT XML</strong></p><p>Now we will know more about the important topic which is JSX. JSX stands for Javascript XML.</p><p>Just think in a simple way JSX used for writing HTML in React that’s it.</p><p>Let&#39;s look into a component of react js which includes XML.</p><p>#Example</p><pre>import React from ‘react’</pre><pre>function Hello(){</pre><pre> const hello = “Hello in JSX”</pre><pre> return &lt;h1&gt;{hello}&lt;/h1&gt; //jsx</pre><pre>}</pre><pre>export default Hello</pre><pre>//output: Hello in JSX</pre><p><strong>#Default Props in Class Component</strong></p><p>It can be defined as the default property of the class components of react.</p><p>Let&#39;s get into the code for getting clear ideas about defaultProps.</p><p>#Example: -</p><pre>class Hello extends React.Component {</pre><pre>}</pre><pre>Hello.defaultProps = {</pre><pre>   color: ‘red’</pre><pre>};</pre><p>If props.color is not given then its default value will be set to red.</p><pre>render() {</pre><pre>    return &lt;Hello /&gt; //props color will be red.</pre><pre>}</pre><p>If we want to change the color then</p><pre>render() {</pre><pre>    return &lt;Hello color={‘blue’} /&gt; //props color will be blue</pre><pre>}</pre><p>That’s the basics about defaultProps in react class component.</p><p><strong>#Props in functional component</strong></p><p>Props in the functional component are very easy.</p><p>#Example</p><pre>function Greetings(props) {</pre><pre>   return &lt;h1&gt;Hello, {props.name}&lt;/h1&gt;</pre><pre>}</pre><pre>export default Greetings</pre><p>Now after importing we can call this component like this:</p><pre>import Greeting from ‘./Greetings’;</pre><pre>function App() {</pre><pre>return (</pre><pre>  &lt;div&gt;</pre><pre>     &lt;Greetings name={‘Shakil’} /&gt;</pre><pre>  &lt;/div&gt;</pre><pre>);</pre><pre>}</pre><pre>//output: Hello, Shakil</pre><p>By following this way we can use props in React functional component.</p><p><strong>#Props in JSX</strong></p><p><strong>*JavaScript Expressions As Props</strong></p><p>We can use any JavaScript expressions as props. Just put them into {}.</p><p>For example:-</p><pre>&lt;NewComponent sum={1+4+5+2} /&gt;</pre><pre>//output: 12</pre><p>This is the basic way to use JavaScript expressions as props.</p><p><strong>*String As Props</strong></p><p>We can pass strings as props. There are two ways given in the example.</p><p>Example:-</p><pre>&lt;ThisComponent string={‘Hello string props’} /&gt;</pre><pre>&lt;ThisComponent stringprop=”Hello string props” /&gt;</pre><p>By using these ways we can pass a string as props.</p><p><strong># State in React Class Component</strong></p><p>The state mainly contains specific data which can be changed in the future. The state is very useful in react.</p><p>Let look into the example: -</p><pre>class MyComponent extends React.Component {</pre><pre>constructor(props){</pre><pre>super(props)</pre><pre>this.state = { name : “shakil” }</pre><pre>}</pre><pre>render () {</pre><pre>return &lt;h1&gt;Hello {this.state.name}&lt;/h1&gt;</pre><pre>//for updating this state we will use this.setState = {name : “hridoy”}}</pre><pre>}</pre><pre>}</pre><p><strong>#State in React Functional Component</strong></p><p>We got a primitive idea about the concept of state from previous section. Now we will learn about the way to use state in react functional component.</p><pre>function Mycomponent(){</pre><pre>const [name, setName] = useState(“shakil”)</pre><pre>return &lt;h1&gt;Hello, {name}&lt;/h1&gt;</pre><pre>//for updating state we will use setState(“hridoy”)</pre><pre>}</pre><p>By following this way we can use state in react functional component.</p><p><strong>#Ternary Operator</strong></p><p>We can use the ternary operator for conditional rendering. You can understand more by following the given example.</p><p>Example: -</p><pre>function MyComponent(){</pre><pre>const click = true;</pre><pre>return (</pre><pre>click ? &lt;h1&gt;Click is true &lt;/h1&gt; : &lt;h1&gt; Click is false &lt;/h2&gt;</pre><pre>//if click = true then Click is true else click is false</pre><pre>)</pre><pre>}</pre><p>This is a basic way of using the ternary operator.</p><p>That’s all for today. I am a new blogger trying to write about some basics of JavaScript, React Js, and their fundamentals. I am not so expert so there are many mistakes in my article if you find any mistake, please forgive me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69a44e5dcfeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s get ideas about some interesting topics of JavaScript]]></title>
            <link>https://shakil2chowdhury.medium.com/lets-get-ideas-about-some-interesting-topics-of-javascript-b23b6fecd0be?source=rss-5a95d7baf81d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b23b6fecd0be</guid>
            <category><![CDATA[javascript-basics]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Shakil Chowdhury]]></dc:creator>
            <pubDate>Thu, 06 May 2021 15:55:00 GMT</pubDate>
            <atom:updated>2021-05-06T15:58:14.916Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article we will discuss about some interesting topics and methods of javascript.</p><p>Lets go through it.</p><p><strong>#typeOf()</strong></p><p>There are many types of values is javascript. So sometimes its confusing to know about some value types.</p><p>Lets get into a example to understand about this : -</p><pre>console.log(typeOf(4)) //output — “number”</pre><pre>console.log(typeOf(‘shakil’) //output — “string”</pre><p><strong>#Comments</strong></p><p>Sometimes its important to do some commenting in code. For big applications when you get into it if there is no comment in the particular module of codes it will be hard to take care of it for a upgrade.</p><p>We can do commenting in JavaScript also. Lets focus on the example to understand about JavaScript commenting.</p><pre>//check prime number</pre><pre>Prime:</pre><pre>//check prime numbers between 1 to 9</pre><pre>for(i=10; i&lt;10; i++){</pre><pre>//check if i is a prime number</pre><pre>   for (let j=1; j &lt; i; j++) {</pre><pre>    if(i%j == 0) continue Prime;</pre><pre>   }</pre><pre>}</pre><p>But now a days using // this type of commenting allows you to comment only in one line and that’s is not a good commenting option so that developers use multiline commenting by</p><pre>/*</pre><pre>This will allow you to do multiline commenting</pre><pre>*/</pre><p><strong>#Curly braces</strong></p><p>Now a days many of us don’t know about the best variants of curly braces.</p><p>Here we will see the best practice of using curly brace. Lets focus on the example.</p><pre>if(g &lt; 11) {</pre><pre>alert(‘{g} is less than 11’)</pre><pre>}</pre><p>Now we will discuss about one of the most useful topic of javascript which is Error Handling.</p><p>Every programmers know about errors . Sometimes its hard to get know about the exact error and handle it. So here we will discuss about error handling functionalities in javascript.</p><p><strong>#The try….catch syntax</strong></p><p>Let get into code first :-</p><pre>try {</pre><pre>//code</pre><pre>}</pre><pre>catch (error){</pre><pre>//error handling</pre><pre>}</pre><p>In the try block we will write our code. And in the catch section we will write the warning if there is any error in the try block. By passing error object in the catch we can get the error if there is any error in the try block. By using this we can do error handling so that the error in code in the try block will not kill the entire script.</p><p><strong>#Error object</strong></p><p>The error we pass through the catch block is an object. And it has some properties.</p><p>It has two main properties for all built in errors.</p><p>Lets get some ideas about the properties.</p><p><strong># name (error object property)</strong></p><p>By using name we can get the error name . Like for an undefined variable it will return Reference Error.</p><p>Lets check out an example if we pass an undefined variable in try block lets see what the error catch block returns.</p><p>Example :-</p><pre>try {</pre><pre>Uncle //undefined variable</pre><pre>}</pre><pre>catch(error) {</pre><pre>console.log(error.name);</pre><pre>}</pre><pre>Output: ReferenceError</pre><p><strong>#message (property of error object)</strong></p><p>The message property of error is a useful property to understand more about the error.</p><p>For more understanding lets go through the code and examine the output :-</p><p>Example: -</p><pre>try {</pre><pre>notimeforprem</pre><pre>} catch (error) {</pre><pre>console.log(error.message);</pre><pre>}<br>//output: notimeforprem is not defined</pre><p><strong>#stack (property of error object)</strong></p><p>Sometimes its important to know more about the errors . Mainly stack property used for debugging. If we dive into the example code and analyze the output we will understand more about this property.</p><pre>try {</pre><pre>premKorbona</pre><pre>} catch (error) {</pre><pre>console.log(error.stack);</pre><pre>}</pre><pre>//output: ReferenceError: premKorbona is not defined at (…call stack)</pre><p>So from this section we can get proper ideas about error properties.</p><p><strong>#catch binding</strong></p><p>if you don’t need to know about the error. But you want to run your code without knowing the error you can use this. The catch block will return nothing if there is error but the code will run.</p><p>Example :</p><pre>try {</pre><pre>   lol</pre><pre>} catch {</pre><pre>console.log(“error caused”)</pre><pre>}</pre><pre>//output: error caused</pre><p><strong>#Throw operator</strong></p><p>Throw is a special operator for generating an error.</p><pre>try {</pre><pre>   myName = “shakil”</pre><pre>if(!userName) {</pre><pre>   console.log(“no username is defined”)</pre><pre>}</pre><pre>} catch (error){</pre><pre>}</pre><pre>//output: not username is defined.</pre><p>That’s all about today. Thanks for reading my article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b23b6fecd0be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Concepts of JavaScript Value Type Number methods and Properties]]></title>
            <link>https://shakil2chowdhury.medium.com/basic-concepts-of-javascript-value-type-number-methods-and-properties-efc39586e466?source=rss-5a95d7baf81d------2</link>
            <guid isPermaLink="false">https://medium.com/p/efc39586e466</guid>
            <category><![CDATA[javascript-developers]]></category>
            <category><![CDATA[javascript-number]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-basics]]></category>
            <dc:creator><![CDATA[Shakil Chowdhury]]></dc:creator>
            <pubDate>Wed, 05 May 2021 21:06:47 GMT</pubDate>
            <atom:updated>2021-05-05T21:06:47.016Z</atom:updated>
            <content:encoded><![CDATA[<p>We know that JavaScript is the multi paradigm language with built in objects, methods and types of operators. JavaScript also supports Object oriented and functional programming also.</p><p>Lets go through the types of JavaScript values.</p><p>The core JavaScript value types are : -</p><p>1. Number</p><p>2. String</p><p>3. Boolean</p><p>4. Function</p><p>5. Object</p><p>6. Symbol</p><p>Here we will know more about Number type and String type.</p><p>NUMBER</p><p>It is a primitive wrapper object used to represent numbers like integers and other number types. It’s a function mainly which converts a string to other value to the number type.</p><p>Lets jump into some properties and methods of Number type and feel the power of javascript.</p><p>Number Properties</p><p># Number.EPSILON</p><p>This property mainly represents the actual difference between the smallest floating number greater and 1 and 1. We don’t need to create number object to use EPSILON property.</p><p># Number.MAX_VALUE</p><p>By MAX_VALUE property it mainly represents the maximum numeric value representable in JavaScript.</p><p># Number.MIN_VALUE</p><p>By using MIN_VALUE property it represents the smallest numeric positive number value which is representable in javascript.</p><p># Number.NAN</p><p>NAN stands for not a number so this property represents not a number value.</p><p>Now we will get some ideas about javascript Number methods.</p><p>*Number.isFinite()</p><p>By is isFinite we can examine the whether the number is a finite value or not. For this we have to pass a value within the method.</p><p>For example we can see : -</p><pre>console.log(Number.isFinite(1 / 0));</pre><pre>output: false</pre><p>*Number.isInteger()</p><p>Mainly isInteger() method stands for checking a passing value is interger value or not. If we pass a float value within isInteger it will examine the value and returns false. Mainly it will return Boolean value true or false.</p><p>Example : -</p><pre>console.log(Number.isInteger(5 / 2))</pre><pre>Output: false</pre><p>*Number.isNaN()</p><p>This method checks the passed value is a number or not. By isNaN() method we have to pass a value. If we pass a value which is not a number then it will return a Boolean value of true otherwise false.</p><p>Example : -</p><pre>console.log(Number.isNaN(‘x’))</pre><pre>Output: true</pre><p>*Number.parseFloat()</p><p>This method will convert a number or integer value to a float number. We have to pass the value within the parseFloat() property and then it will convert the number value to a float.</p><p>Example: -</p><pre>const integer = 5;</pre><pre>console.log(Number.parseFloat(integer))</pre><pre>Output: 5.000000000000000</pre><p>*Number.prototype.toFixed()</p><p>The toFixed() method mainly fix the position of a float number value using fixed point notation.</p><p>Example : -</p><pre>const floatNumber = 54.5566</pre><pre>console.log(floatNumber.toFixed(2))</pre><pre>output: 54.55</pre><p>This is some important features about JavaScript Number type.</p><p>Thanks all for reading my article. If you have any tips or any ideas you can share in comment box.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=efc39586e466" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>