<?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: Sayem Mohammad Ismail</title>
    <description>The latest articles on DEV Community by Sayem Mohammad Ismail (@smismail).</description>
    <link>https://dev.to/smismail</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%2F629990%2F132e17f4-1c19-4882-a1f0-5766462a4a0d.jpeg</url>
      <title>DEV Community: Sayem Mohammad Ismail</title>
      <link>https://dev.to/smismail</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smismail"/>
    <language>en</language>
    <item>
      <title>10 interesting and important JavaScript questions </title>
      <dc:creator>Sayem Mohammad Ismail</dc:creator>
      <pubDate>Sun, 16 May 2021 14:33:31 +0000</pubDate>
      <link>https://dev.to/smismail/10-interesting-and-important-javascript-questions-k2e</link>
      <guid>https://dev.to/smismail/10-interesting-and-important-javascript-questions-k2e</guid>
      <description>&lt;h3&gt;
  
  
  What is the difference between ‘==’ and ‘===’ ?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;The double equal does not check for the type of the value. It only checks if the value is the same regardless of their types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const first = 10; // number
const second = ‘10’; // string
if (first == second) {
    console.log(‘condition true’); //this will be logged
} else {
    console.log(‘condition false’);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the condition becomes true because &lt;code&gt;==&lt;/code&gt; says 10 and '10' are equal, though one of them is a number and the other one is a string. Their types are ignored by &lt;code&gt;==&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Another example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const first = 1; //number
const second = true; //boolean 

if (first == second) {
    console.log(‘condition true’); //this will be logged
} else {
    console.log(‘condition false’);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, with &lt;code&gt;==&lt;/code&gt; the Boolean &lt;code&gt;true&lt;/code&gt; is taken as value &lt;code&gt;1&lt;/code&gt; and if there was the Boolean &lt;code&gt;false&lt;/code&gt; it would have taken a value &lt;code&gt;0&lt;/code&gt; for &lt;code&gt;false&lt;/code&gt;. Then the value &lt;code&gt;1&lt;/code&gt; for Boolean &lt;code&gt;true&lt;/code&gt; is compared with the number 1 and states the condition to be &lt;code&gt;true&lt;/code&gt;. Once again the types are ignored by &lt;code&gt;==&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, the &lt;code&gt;===&lt;/code&gt; checks for the types as well. It would have stated the conditions of both of the examples here to be &lt;code&gt;false&lt;/code&gt; and logged the &lt;code&gt;else&lt;/code&gt; statement 'condition false'. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is Window ?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;The JavaScript Window object is the field of JavaScript. It is the playground for JavaScript to play.  &lt;/p&gt;

&lt;p&gt;JavaScript Window is an Object that contains everything global. All global variables, functions, objects are part of the window. Global variables are properties of the Window object and global functions are methods of it. &lt;br&gt;
If you check in the console, &lt;code&gt;document === window.document&lt;/code&gt; it will display &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We use &lt;code&gt;console.log&lt;/code&gt; very often. &lt;code&gt;console === window.console&lt;/code&gt; will say &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Items in the window object can be accessed directly in the javaScript. &lt;/p&gt;
&lt;h3&gt;
  
  
  What is Scope and local and global variables?
&lt;/h3&gt;
&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;Scope can be said to be the limit or range of variables. A function has its scope within that function only and the whole JavaScript project has the Global Scope. &lt;/p&gt;

&lt;p&gt;A variable gets the associated scope where it is defined. If it is defined within a function then it has the local scope within that function and becomes a local variable. The variable cannot be accessed from outside the function. &lt;/p&gt;

&lt;p&gt;However, if a variable is defined outside of any function then it gets the global scope and becomes a global variable. A global variable can be accessed from anywhere in the JavaScript project and obviously from within any function. &lt;/p&gt;
&lt;h3&gt;
  
  
  What is the ‘this’ keyword ?
&lt;/h3&gt;
&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;The JavaScript keyword &lt;code&gt;this&lt;/code&gt; refers to the context of the current running functionality. For example, if an object &lt;code&gt;myObj&lt;/code&gt; has a property &lt;code&gt;name&lt;/code&gt; and a method &lt;code&gt;getName()&lt;/code&gt;, and the key word &lt;code&gt;this&lt;/code&gt; is used within the method then &lt;code&gt;this&lt;/code&gt; will refer to the context &lt;code&gt;myObj&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myObj = {
    name: ‘Tom Cruise’,
    getName: function() {
        return console.log(this.name);
        }
};

myObj.getName();  // ‘Tom Cruise’ will be logged in the console.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What is JavaScript Event loop?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;The Event loop is a loop of events. It has two concepts: &lt;code&gt;call stack&lt;/code&gt; and &lt;code&gt;event queue&lt;/code&gt;.&lt;br&gt;
JavaScript is a single threaded programming language that can do one task at a time. If multiple tasks arrive, it simply adds all of them to a queue which is called an &lt;code&gt;event queue&lt;/code&gt;. The &lt;code&gt;event queue&lt;/code&gt; is just any real life queue, the event comes first and gets to be done first. Once the thread is done with the current event it picks up the next event from the queue and starts performing that event. The thread continues this way until the &lt;code&gt;event queue&lt;/code&gt; is empty. &lt;/p&gt;

&lt;p&gt;The thread works on each event with a &lt;code&gt;call stack&lt;/code&gt;. When an event calls a function, the thread then stacks that function up on the event and any other function called inside the previous function also gets stacked up. Then the thread starts performing from the top of the stack eliminating each function down the line to get to the bottom of the stack and makes the call stack empty. &lt;/p&gt;
&lt;h3&gt;
  
  
  How does JavaScript code execute?
&lt;/h3&gt;
&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;The web browser Google chrome uses an engine &lt;code&gt;V8&lt;/code&gt; to run the JavaScript on the browser. &lt;code&gt;V8&lt;/code&gt; engine takes the JavaScript source code and reads it. It then performs the just in time compilation on the JavaScript code and makes some optimizations. Finally, &lt;code&gt;V8&lt;/code&gt; engine provides the result/output. &lt;/p&gt;
&lt;h3&gt;
  
  
  How does a recursive function work?
&lt;/h3&gt;
&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;In order to perform a task, a recursive function calls itself over and over again with updated inputs until it reaches a stopping point. &lt;/p&gt;

&lt;p&gt;For example, let’s say, we need to find the factorial of 5 or 5! Writing a recursive function &lt;code&gt;findFactorial()&lt;/code&gt;,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function findFactorial (number) {
    if (number ===1) {
    return number;
    } else {
    return number * findFactorial(number - 1);
    }
} 

const result = findFactorial(5); 
console.log(result); //result is 120
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What is DOM?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;DOM stands for Document Object Model. To show a HTML file in a web page, the browser converts the HTML file into a JavaScript object. This JavaScript object is known as DOM. The whole HTML file is contained in it. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is a callback function?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;A function that is passed as an argument in another function is a call back function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function greetFriend(name){
    console.log(“Hello ”, name);
}  
function  doGreeting(name, handleGreeting){
    handleGreeting(name);
}

doGreeting(“Tom”, greetFriend); // “Hello Tom” 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;greetFriend&lt;/code&gt; is passed in as a call back function to the function doGreeting. Here, &lt;code&gt;greetFriend&lt;/code&gt; is a named function that has a name to call it. The call back function can be anonymous as well, that is it won’t have a name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;doGreeting(“Tom”, function(name){
    console.log(“Hello”, name);
}) 
//”Hello Tom” will be logged here too.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The call back here does not have a name and so, it is an anonymous call back function. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is an API and what do GET and POST do?
&lt;/h3&gt;

&lt;h6&gt;
  
  
  Answer:
&lt;/h6&gt;

&lt;p&gt;API stands for Application programming Interface. API is what facilitates communication or interaction between applications or usually between client side application and server/servers or system etc.&lt;/p&gt;

&lt;p&gt;In simple terms, API is the medium that takes the request of the user and delivers it to the server or system, then takes the response of the system or server and delivers the response to the user. &lt;/p&gt;

&lt;p&gt;For example, all our online activity is facilitated by APIs. If you sign up to a website, there is an API that takes your request and system stores your credentials to the database and allows you access, then API delivers your access to you and you are signed in. There are many more such examples. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;GET&lt;/code&gt; request characterizes an API to perform the job of delivering the response of the system to the user upon user request. &lt;br&gt;
And the &lt;code&gt;POST&lt;/code&gt; request characterizes an API to send or store data or user response to the system or server or database. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>computerscience</category>
      <category>career</category>
    </item>
    <item>
      <title>10 basic concepts of React JS</title>
      <dc:creator>Sayem Mohammad Ismail</dc:creator>
      <pubDate>Sun, 16 May 2021 04:16:37 +0000</pubDate>
      <link>https://dev.to/smismail/10-basic-concepts-of-react-js-4hfh</link>
      <guid>https://dev.to/smismail/10-basic-concepts-of-react-js-4hfh</guid>
      <description>&lt;p&gt;Nowadays React Js has been quite a popular framework for web development. It has some incredible features to offer that made it so successful. Here, I present 10 of them that I find interesting — &lt;/p&gt;

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

&lt;p&gt;The virtual DOM (VDOM) is a programming concept where an ideal, or “virtual”, representation of a UI is kept in memory and synced with the “real” DOM by a library such as ReactDOM. &lt;/p&gt;

&lt;p&gt;DOM manipulation in most JavaScript frameworks get the DOM updated/rebuilt in its entirety in response to any change, even for a very small change. Modern websites may have a lot of data and may use a big amount of DOM manipulation. In such a scenario the process gets very inefficient. &lt;/p&gt;

&lt;p&gt;The Virtual DOM acts like a blueprint for the real DOM. For every DOM object react creates a corresponding virtual DOM object which becomes a representation of the DOM. Such a VDOM same properties as real DOM but lacks the power to change the screen display elements directly. Manipulating DOM might be slow but manipulating the VDOM is faster as nothing is onscreen. Though VDOM update also makes all of the VDOM objects updated, it is still incredibly faster as mentioned before. Once VDOM gets updated, react compares the updated VDOM with the immediate previous VDOM (before the update). This way react gets to know exactly which VDOM objects got changed and it makes only and only that change to the actual DOM to show on screen. &lt;/p&gt;

&lt;p&gt;Thus, react updates only the required parts of the DOM making it very efficient. &lt;/p&gt;

&lt;h3&gt;
  
  
  JSX :
&lt;/h3&gt;

&lt;p&gt;The JSX in react is a syntactic version of writing just the function &lt;code&gt;React.createElement(component, props, ...children)&lt;/code&gt;. And the code format for JSX is,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const jsxElement = &amp;lt;h1 className= ”greeting”&amp;gt; Hello World ! &amp;lt;/h1&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is called JSX and it is a syntax extension of JavaScript. This code compiles into &lt;code&gt;React.createElements()&lt;/code&gt; calls, this way,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;React.createElemet(
    ‘h1’,
    {className: ‘greeting’},
    ‘Hello World !’
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function in turn converts into a object like,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const jsxElement = {
    type: ‘h1’,
    props: { 
        className: ‘greeting’,
        children: ‘Hello World !’
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Embedding expressions in JSX
&lt;/h3&gt;

&lt;p&gt;Valid JavaScript expressions can be embedded in a JSX code, such as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user = “Tom Cruise”
const jsxElement = &amp;lt;h1&amp;gt; Hello, {user} &amp;lt;/h1&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  React Elements:
&lt;/h3&gt;

&lt;p&gt;Elements are the building blocks for components. An example for a simple element is such,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const element = &amp;lt;h1&amp;gt;I am an Element&amp;lt;/h1&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Rendering Elements:
&lt;/h3&gt;

&lt;p&gt;React apps usually have a single &lt;code&gt;root DOM node&lt;/code&gt; in the HTML file, which is &lt;code&gt;&amp;lt;div id="root"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; and react DOM manages everything inside it.&lt;br&gt;&lt;br&gt;
In order to render a react element in the root DOM node, both of them have to passed into &lt;code&gt;ReactDOM.render()&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const element = &amp;lt;h1&amp;gt;I am an Element&amp;lt;/h1&amp;gt; ;
ReactDOM.render(element, document.getElementById("root"));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Components:
&lt;/h3&gt;

&lt;p&gt;Components are JavaScript functions that take arbitrary inputs as &lt;code&gt;props&lt;/code&gt; and return the elements for UI. It allows the developer to work with different sections of the app discreetly.&lt;br&gt;&lt;br&gt;
Component is defined as a JavaScript function,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Greeting (props) {
    return &amp;lt;h1&amp;gt;Hello, {props.name}&amp;lt;/h1&amp;gt;
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now this function can be called as component &lt;code&gt;&amp;lt;Greeting /&amp;gt;&lt;/code&gt; . &lt;/p&gt;

&lt;h3&gt;
  
  
  Class Components:
&lt;/h3&gt;

&lt;p&gt;Components a]can also be defined as ES6 class. Both function and class components have the same features.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Greeting extends React.Component {
    render () {
         &amp;lt;h1&amp;gt;Hello, {this.props.name}&amp;lt;/h1&amp;gt;
        }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both ways of defining components are equivalent to react. &lt;/p&gt;

&lt;h3&gt;
  
  
  Component rendering:
&lt;/h3&gt;

&lt;p&gt;Rendering a component is the same as rendering an element. The element here shall represent the component defined.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Greeting (props) {
    return &amp;lt;h1&amp;gt;Hello, {props.name}&amp;lt;/h1&amp;gt;
}

const element = &amp;lt;Greeting /&amp;gt;;

ReactDOM.render(
    element,
    document.getElementById(“root”)
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Component Lifecycle:
&lt;/h3&gt;

&lt;p&gt;There are many component lifecycle methods to be called upon either the rending of the component (called “mounting” in react) or removal of the component (called “Unmounting” in react) or change in the props or state (called “updating” in react).&lt;/p&gt;

&lt;p&gt;The commonly used Lifecycle methods are as given below,&lt;/p&gt;

&lt;h6&gt;
  
  
  mounting
&lt;/h6&gt;

&lt;p&gt;These methods are called in the following order when an instance of a component being created and inserted into the DOM. &lt;br&gt;
&lt;code&gt;constructor()&lt;/code&gt;&lt;br&gt;
&lt;code&gt;render()&lt;/code&gt;&lt;br&gt;
&lt;code&gt;componentDidMount()&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  updating
&lt;/h6&gt;

&lt;p&gt;An update can be caused by the change in props or state. These methods are called in the following order when a component is re-rendered.&lt;br&gt;
&lt;code&gt;render()&lt;/code&gt;&lt;br&gt;
&lt;code&gt;componentDidUpdate()&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  unmounting
&lt;/h6&gt;

&lt;p&gt;This method is called when a component gets removed from the DOM. &lt;br&gt;
&lt;code&gt;componentWillUnmount()&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Other APIs and Properties:
&lt;/h3&gt;

&lt;p&gt;There are Two other APIs that can be called from the component,&lt;br&gt;
&lt;code&gt;setState()&lt;/code&gt;&lt;br&gt;
&lt;code&gt;forceUpdate()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There are properties of two categories, and they are class properties and instance properties.&lt;/p&gt;

&lt;h6&gt;
  
  
  Class Properties
&lt;/h6&gt;

&lt;p&gt;&lt;code&gt;defaultProps&lt;/code&gt;&lt;br&gt;
&lt;code&gt;displayName&lt;/code&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Instance Properties
&lt;/h6&gt;

&lt;p&gt;&lt;code&gt;props&lt;/code&gt;&lt;br&gt;
&lt;code&gt;state&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources:&lt;/em&gt; &lt;a href="https://reactjs.org/docs/faq-internals.html#:~:text=The%20virtual%20DOM%20(VDOM)%20is,This%20process%20is%20called%20reconciliation."&gt;VDOM&lt;/a&gt;, &lt;a href="https://reactjs.org/docs/jsx-in-depth.html"&gt;JSX&lt;/a&gt;, &lt;a href="https://reactjs.org/docs/rendering-elements.html"&gt;elements&lt;/a&gt;, &lt;a href="https://reactjs.org/docs/components-and-props.html"&gt;components and props&lt;/a&gt;, &lt;a href="https://reactjs.org/docs/state-and-lifecycle.html"&gt;state and lifecycle&lt;/a&gt;, &lt;a href="https://reactjs.org/docs/react-component.html#defaultprops"&gt;default props&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Some basic concepts for web developers</title>
      <dc:creator>Sayem Mohammad Ismail</dc:creator>
      <pubDate>Thu, 13 May 2021 11:36:37 +0000</pubDate>
      <link>https://dev.to/smismail/some-coding-concepts-for-web-developers-3n2c</link>
      <guid>https://dev.to/smismail/some-coding-concepts-for-web-developers-3n2c</guid>
      <description>&lt;p&gt;Websites are a crucial part of this modern digital world. The developers who develop the websites need to have the knowledge of up to date &lt;br&gt;
Tools and technologies. Because, programming languages, tools, frameworks etc. always get modified, updated and replaced with a better one. &lt;br&gt;
Here I present some basic concepts to know in the first place:&lt;/p&gt;
&lt;h3&gt;
  
  
  JavaScript
&lt;/h3&gt;
&lt;h5&gt;
  
  
  Expressions:
&lt;/h5&gt;

&lt;p&gt;In the JavaScript programming language expressions are like questions asked that will be answered by JavaScript. For example, &lt;br&gt;
“ 10+100 ” is an expression and the answer is a value ‘110’. And JavaScript only answers with values.&lt;/p&gt;
&lt;h5&gt;
  
  
  Values:
&lt;/h5&gt;

&lt;p&gt;JavaScript has 9 different types of values. 7 of them are Primitive Values and the rest two are Object and Function. &lt;br&gt;
An Object is a collection of data, often denoted inside curly braces &lt;code&gt;{}&lt;/code&gt;, while a function is a set of commands that does a particular work upon call. A function usually takes a name for it to be referred with and holds its set of commands within curly braces and takes its arguments, if any, in parenthesis, such as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function sum (x, y) {
    const result = x + y;
    return result;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Primitive Values:
&lt;/h5&gt;

&lt;p&gt;Primitive values are such values that cannot not be manipulated from the code. Though currently there are 7 of them, we are talking only about the most commonly used 5 of the primitive values. They are as such,&lt;br&gt;
&lt;code&gt;Undefined&lt;/code&gt; - (undefined) used for for unintentionally missing values &lt;br&gt;
&lt;code&gt;Null&lt;/code&gt; - (null) used for intentionally missing values&lt;br&gt;
&lt;code&gt;Booleans&lt;/code&gt; - (true and false) used for logical operations&lt;br&gt;
&lt;code&gt;Numbers&lt;/code&gt; - (1,2,3, negative numbers and all other numbers) used for mathematical calculations &lt;br&gt;
&lt;code&gt;Strings&lt;/code&gt; - (‘lorem ipsum’ etc.) used for texts&lt;/p&gt;
&lt;h5&gt;
  
  
  Errors :
&lt;/h5&gt;

&lt;p&gt;Errors are the worst nightmare for programmers. However, JavaScript offers a mechanism, syntax construct “try...catch” that helps in &lt;br&gt;
handling errors. If there is an error the script then dies(stops running immediately), but ‘try...catch’ lets to catch the error and make the &lt;br&gt;
script do something meaningful instead of dying. &lt;br&gt;
Here, ‘err’ is the error object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {
    // code here
} catch (err) {
// handle error
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  Error Object:
&lt;/h5&gt;

&lt;p&gt;The error object contains the error name and the error message. We can name the error object with any other word than ‘err’.&lt;br&gt;&lt;br&gt;
The error name is the name of the error that happened, such as, for an undefined variable the name of the error is “ReferenceError”. &lt;br&gt;
Meanwhile, the error message is the text that contains the detailed information about the error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Try {
    lorrem ipsum;  // making an error 
} catch (err) {
    alert (err.name); // ReferenceError
    alert (err.message); //lorem ipsum is not defined
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Caching Concepts
&lt;/h3&gt;

&lt;h5&gt;
  
  
  Caching:
&lt;/h5&gt;

&lt;p&gt;API communication is like a negotiation between the client and the server, where caching is an aspect. &lt;br&gt;
Caching is a concept of efficiency of data availability. It refers to a mechanism for storing some data, commonly accessed by users, in many places and serving them to users from the common data store. &lt;/p&gt;

&lt;h5&gt;
  
  
  Data cost:
&lt;/h5&gt;

&lt;p&gt;Data cost is simply the idea that every operation, every function that we do with an API produces some sort of cost, which arises from several factors and systems, originating from both the client and server side. At the end, every bit of data has a cost associated with its generation, storage and transfer. This cost is called the data cost. &lt;br&gt;
The data cost isn’t always controllable and to reduce it caching is helpful.&lt;/p&gt;

&lt;h5&gt;
  
  
  Client caching:
&lt;/h5&gt;

&lt;p&gt;Client caching refers to storing some commonly asked/requested data in the client/application side. This mechanism helps reduce the data cost and boost up efficiency. For example, an application can have its username and user id for an user cached in, so that every time it might not require asking the server for the username and user id. &lt;/p&gt;

&lt;h5&gt;
  
  
  Server caching:
&lt;/h5&gt;

&lt;p&gt;Server caching refers to responding to multiple user requests using the same data or parts of the same requests made by other users. This mechanism helps reduce server side data cost. &lt;/p&gt;

&lt;h3&gt;
  
  
  Cross browser testing
&lt;/h3&gt;

&lt;h5&gt;
  
  
  Cross browser testing:
&lt;/h5&gt;

&lt;p&gt;A web developer needs to make it sure that the application works on nearly all web browsers and it is done with cross browser testing. &lt;br&gt;
Cross browser issues commonly occur because, sometimes the browser may have bugs or implement features differently, it may have different levels of support for technology features or even due to some device constraints.&lt;br&gt;
Workflows for cross browser testing is as such, &lt;br&gt;
&lt;code&gt;Initial planning &amp;gt; Development &amp;gt; Test &amp;gt; Fix / iterate&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources:&lt;/em&gt;  &lt;a href="https://drive.google.com/file/d/11Fyf7wgKmRXDAgyEKAZK4DWfooKth3RD/view"&gt;types of values&lt;/a&gt;, &lt;a href="https://javascript.info/try-catch"&gt;try-catch&lt;/a&gt;, &lt;a href="https://nordicapis.com/balancing-client-and-server-caching-in-web-application-development/"&gt;balancing caching&lt;/a&gt;, &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Introduction"&gt;cross browser testing&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>computerscience</category>
      <category>career</category>
    </item>
  </channel>
</rss>
