<?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: Edeke Emmanuel</title>
    <description>The latest articles on DEV Community by Edeke Emmanuel (@ebakecode).</description>
    <link>https://dev.to/ebakecode</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%2F800618%2Fa1dc969f-4333-4684-bab3-859f3b59a316.jpg</url>
      <title>DEV Community: Edeke Emmanuel</title>
      <link>https://dev.to/ebakecode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ebakecode"/>
    <language>en</language>
    <item>
      <title>Method js JavaScript core principles</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Wed, 03 May 2023 16:49:50 +0000</pubDate>
      <link>https://dev.to/ebakecode/method-js-javascript-core-principles-18db</link>
      <guid>https://dev.to/ebakecode/method-js-javascript-core-principles-18db</guid>
      <description>&lt;p&gt;JavaScript Method is a property of an object, that performs certain function or task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Object Method
&lt;/h2&gt;

&lt;p&gt;It's a function property in an object scope.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// object containing major types of method
const person = {
    name: 'John',

    greet: function() { 
let reply = 'Good morning ' + this.name
console.log(reply); 
},

//short syntax
greetBack() {
  return "How are you " + this.name + " ?"
},

//Compose Method
["reply" + 2]() {
  console.log('I am fine ' + this.name)
},

//Async Method
kate: async function() {
  console.log(this.name + ', Boss want to see you');
},

async boss() {
  let reply = 'Have your seat, ' + this.name
  await console.log(reply);
},

//Generator Method 
increment: function* () {
    let index = 5;
    while (true) {
      yield console.log(index++);
    }
  },

async *decrement () {
    yield console.log(4);
  },

};

person.greet(); //Good morning John
console.log(person.greetBack()); //How are you John ?
person.reply2(); // I am fine John
person.kate(); //John, Boss want to see you
person.boss(); //Have your seat, John 
person.increment().next(); //5
person.decrement().next(); //4 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding Method to Object
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#1
var a = new Object();
a.method = function(){}

#2
var a = new Object();
a.prototype.method = function(){}

#3
function myObject() {
    this.method = function(){}
}
var a = new myObject();

#4
function myObject() {}
myObject.prototype.method = function(){}
var a = new myObject();

#5
var a = {
    method: function(){}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Class Method
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Greeting {
  msg = "Good morning friend's";
//Method
  morningGreet() {
    return this.msg;
  }
}

class Person extends Greeting {
  speak() {
    return super.morningGreet();
  }
}

//instance of class
const john = new Person();
console.log(john.speak());   
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Person { 

constructor(name) {         
this.name = name;   
} 

getName() {     
    return this.name;
    }

//Static Method
static createAnonymous(gender) {
        let name = gender == "female" ? "John Doe" : "Jane Doe";
        let req = new Person(name);
        return console.log(req);
} 

//Private Method
#occupation = "UI/UX";
#biodata; 

#status() {
  let req = "She is an elegant " + this.#occupation + " by profession and well mannered person."
  return console.log(req)
}

//Private Static Method
static #age() {
  let req = 'Jane Doe is 20 year old beautiful woman.'  
  return console.log(req)
}

//returning request of both private and static method with getProfile()
getProfile() {
  let statusA, statusB;
//calling private and static private method in statusA and statusB
  statusA = Person.#age();
  statusB = this.#status();

  let req = statusA + statusB;
  return console.log(req);
}   

}
Person.createAnonymous('female');

//calling instance of static method
let person = new Person();
person.constructor.createAnonymous('female');

person.getProfile();

person.createAnonymous('female') //Type Error
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you can't call a private method into a static private method but you can call static private method inside private method &lt;/li&gt;
&lt;li&gt;If you attempt to call the static method from an instance of the class, you’ll get an error when using new.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Accessing Method
&lt;/h2&gt;

&lt;p&gt;This is a means of getting the method name from the object name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;objectName.methodName()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const client = {
name:  'Jane Doe',
greet() {
return `Good morning Mrs ${client.name}`;
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Accessing Method
client.greet(); //Good morning Mrs Jane Doe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Accessing Property
client.name; //Jane Doe 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Function js JavaScript advance principles</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Mon, 17 Apr 2023 22:06:24 +0000</pubDate>
      <link>https://dev.to/ebakecode/function-js-javascript-advance-principles-1je0</link>
      <guid>https://dev.to/ebakecode/function-js-javascript-advance-principles-1je0</guid>
      <description>&lt;h2&gt;
  
  
  Conditional function
&lt;/h2&gt;

&lt;p&gt;Function can be declare in a conditional statement.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QVCrmGsd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lo5n10nm5sevx3p302wj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QVCrmGsd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lo5n10nm5sevx3p302wj.png" alt="Image description" width="800" height="712"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Recursive function
&lt;/h2&gt;

&lt;p&gt;This is a function that call itself. Just for instance, looping with &lt;code&gt;while&lt;/code&gt; loop can run code for infinite number of times but when &lt;code&gt;break&lt;/code&gt; keyword is applied, it prevent such from happening, likewise recursive function can be infinite.&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;if&lt;/code&gt;...&lt;code&gt;else&lt;/code&gt; statement ends infinite recursion.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0X5lejQX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lst2mzh6tqdh8jbukdc6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0X5lejQX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lst2mzh6tqdh8jbukdc6.png" alt="Image description" width="800" height="895"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Callback function
&lt;/h2&gt;

&lt;p&gt;This is simply when an arguments is passed as a function call in another function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---vuCMly5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtt3fs9mt6nrn3iu0dzh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---vuCMly5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtt3fs9mt6nrn3iu0dzh.png" alt="Image description" width="800" height="771"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  with function expression
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YyCuk0kb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cey11eqybkl8qjey8qio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YyCuk0kb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cey11eqybkl8qjey8qio.png" alt="Image description" width="800" height="560"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  with more function expression
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oDCMm_mW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtrmgon2cllt5r0e5oea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oDCMm_mW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mtrmgon2cllt5r0e5oea.png" alt="Image description" width="800" height="853"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Array method runs as function
&lt;/h2&gt;

&lt;p&gt;These are some array method like map, reduce, filter, slice ... are use as a function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const number = [10, 20, 30, 40, 50]; 
//adding 100 to each value in number
const result = number.map( 
(num) =&amp;gt; num += 100
) 
console.log(number); // [10, 20, 30, 40, 50]
console.log(result); // [110, 120, 130, 140, 150]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Review my article on all JavaScript method; array methods...&lt;/p&gt;

&lt;p&gt;Click now 👆&lt;/p&gt;

&lt;h2&gt;
  
  
  Arguments in function call
&lt;/h2&gt;

&lt;p&gt;It's when many argument are pass to a function along with a seperator like &lt;strong&gt;, ; : - _&lt;/strong&gt; using &lt;code&gt;arguments[i]&lt;/code&gt;; this simply means array of argument from 0 to any positive number.&lt;/p&gt;

&lt;p&gt;It have a similarity in rest parameters. To get the total number of arguments passed use the keyword &lt;code&gt;arguments.length&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qj2A08OS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cigmjz1niyzfpptww5b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qj2A08OS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0cigmjz1niyzfpptww5b.png" alt="Image description" width="800" height="377"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Rest parameters
&lt;/h2&gt;

&lt;p&gt;This is when a function call many parameter with it parenthesis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nuZkzqvU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pw6m77fr05rg92939ebk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nuZkzqvU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pw6m77fr05rg92939ebk.png" alt="Image description" width="800" height="513"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Nested function
&lt;/h2&gt;

&lt;p&gt;Simply refer to as function in a 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 divide(x) {
  function value(y) {
    return x / y;
  }
  return value;
}
console.log(divide(10)(5)); //2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  With two parameter
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TyVQfFfz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e32mpi066yg3po14dr54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TyVQfFfz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e32mpi066yg3po14dr54.png" alt="Image description" width="800" height="771"&gt;&lt;/a&gt;&lt;br&gt;
It also form a closure, meaning the inner function(second function) can only be accessed with in the outer function and can make use of the arguments and variables of the outer function(first function) while outer function can not access variables or define function inside a inner function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Function closure
&lt;/h2&gt;

&lt;p&gt;These are inner function in a outer function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZCekd_p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grz622j5lh8vvizhyma3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZZCekd_p--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/grz622j5lh8vvizhyma3.png" alt="Image description" width="800" height="1038"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  without parameter
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FHbZ_fE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17x3qaa18ysdbs49cqny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FHbZ_fE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17x3qaa18ysdbs49cqny.png" alt="Image description" width="800" height="658"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Function Curry
&lt;/h2&gt;

&lt;p&gt;This is a sequence of &lt;code&gt;function&lt;/code&gt; that runs each containing a single parameter and then return many &lt;code&gt;argument&lt;/code&gt;.&lt;br&gt;
It's &lt;code&gt;function&lt;/code&gt; that return other &lt;code&gt;function&lt;/code&gt; with single parameter each. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3bOPzxis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eeiqqrtqay5o003jhgbb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3bOPzxis--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eeiqqrtqay5o003jhgbb.png" alt="Image description" width="800" height="728"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Function Composition
&lt;/h2&gt;

&lt;p&gt;This is applying more than one function to a function call.&lt;br&gt;
It's shows similarities to mathematical derivations in function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--O4M5EV7O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2aglpe0hgqdghohgkcrk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--O4M5EV7O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2aglpe0hgqdghohgkcrk.png" alt="Image description" width="800" height="592"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Function Decorator
&lt;/h2&gt;

&lt;p&gt;This is a &lt;code&gt;function&lt;/code&gt; that takes one &lt;code&gt;function&lt;/code&gt; as an argument and return that &lt;code&gt;function&lt;/code&gt; with variation of argument. &lt;br&gt;
This is refers to as a design pattern, that wraps function in another function. &lt;br&gt;
It can also be use in Class decorator and Class member decorators. It is deep in learning and widely used in TypeScript, for to be use in JavaScript needs some tools like Babel and TypeScript compiler.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---i5D15iB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fztxj0rcltfl2kk5gczq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---i5D15iB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fztxj0rcltfl2kk5gczq.png" alt="Image description" width="800" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  unary function
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ce4RmiWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pewapm7pgptnp3u0lds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ce4RmiWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pewapm7pgptnp3u0lds.png" alt="Image description" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  multiple nested function
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w8OOwNLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxla8g99bv6zwoh8kacn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w8OOwNLI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxla8g99bv6zwoh8kacn.png" alt="Image description" width="800" height="691"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Function js JavaScript complete guide</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Mon, 17 Apr 2023 11:56:43 +0000</pubDate>
      <link>https://dev.to/ebakecode/function-js-javascript-complete-guide-2ih1</link>
      <guid>https://dev.to/ebakecode/function-js-javascript-complete-guide-2ih1</guid>
      <description>&lt;p&gt;A function is a set of statement or procedure on how to perform a particular task or calculate the value of a given parameters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Function Lite
&lt;/h2&gt;

&lt;p&gt;Function contain parenthesis with enclose parameters(or rather a function with an arguments) or none parameter and body of procedures or statements to perform a given task.&lt;/p&gt;

&lt;p&gt;A function call runs every program of a given function body.&lt;/p&gt;

&lt;h3&gt;
  
  
  Princple/basic code of function
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//General formular =&amp;gt;
function parenthesis(parameters) {
body of statement or procedure...
return ...
}
//calling a function
parenthesis(parameters);

//Clear example:
function add(number) {
let solution = number + number;
return solution;
}
console.log(add(5)) //10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Declaring or defining a function
&lt;/h3&gt;

&lt;p&gt;These are means of naming a function that run set of program, it can either be Anonymous &amp;amp; Non anonymous.&lt;/p&gt;

&lt;h4&gt;
  
  
  Anonymous function
&lt;/h4&gt;

&lt;p&gt;It's a function with no defined name or parenthesis.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Ordinary Function:
(function() { 
console.log(2);
})();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Function can either be an ordinary or arrow, they both have similar objective but different code structure.&lt;/p&gt;

&lt;p&gt;The use of &lt;code&gt;();&lt;/code&gt; at every end of a function, it's called invoking a function. This is a function calling itself automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;( () =&amp;gt; {
console.log('Hello World');
}) ();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Function expression&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The step of using the keyword let, const &amp;amp; var to declare a variable, which in return this variable is use to store a function as the value to be executed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const multiply = function (num) {
return num * num;
}
console.log(multiply(5));//25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Non anonymous
&lt;/h4&gt;

&lt;p&gt;Simply a defined function with parenthesis.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Ordinary Function:
function add(num) { 
return num + num;
}
console.log(add(5));//10

//Function  expression: 
const operation = function sub(num) {
return num - 1;
}
console.log(operation(5)); //4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Default parameters
&lt;/h3&gt;

&lt;p&gt;A stand-by define parameter use or an assigned value for a given parameter.&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(name, message = 'Good morning') {

const typing = message + name;
return typing;

}
console.log(greeting(' John')); //Good morning John
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Return
&lt;/h3&gt;

&lt;p&gt;This gives the value of the body of function executed to a function call. Any code after &lt;code&gt;return&lt;/code&gt; will not execute or run within the function scope.&lt;/p&gt;

&lt;h3&gt;
  
  
  Function scope
&lt;/h3&gt;

&lt;p&gt;This basically talks about the user access to a variable or function inside or outside a scope &lt;code&gt;{}&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Function can access a variable outside it scope &lt;code&gt;{}&lt;/code&gt; and also modify it(make changes on it).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Variable declared inside a function or condition statement can not be accessed outside it scope &lt;code&gt;{}&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If two variable are defined either inside or outside function scope with the same name, then the function only pick or access the one inside the scope &lt;code&gt;{}&lt;/code&gt; of a function.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;In hoisting; a variable declared using only var or fuction call before it statement of function or body of code(except using function expression), will be executed or run code without any expected error.&lt;/u&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Calling a function
&lt;/h3&gt;

&lt;p&gt;It's accomplished when the body of function is program on the procedure of how a task should be executed, so the expected output must be called, to show result to the user.&lt;/p&gt;

&lt;p&gt;It contain the name of the function with defined argument.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function admin(user) {
return user = `${user} is a junior officer`;
}
console.log(admin('John'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Equivalent in function call&lt;/p&gt;

&lt;p&gt;Simple description 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 clothVendor = function sharonWares(rate) {
return ...;
}

clothVendor() == sharonWares() == arguments.callee()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arrow function
&lt;/h3&gt;

&lt;p&gt;Arrrow function are always anonymous and the ES6 syntax for &lt;em&gt;function.js&lt;/em&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 person= (name)=&amp;gt; {
return name + ", He is eloquent";
}
console.log(person("John")); //John, He is eloquent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There syntax are always short in expression and does not have its own &lt;code&gt;this&lt;/code&gt;, &lt;code&gt;arguments&lt;/code&gt;, &lt;code&gt;super&lt;/code&gt;, or &lt;code&gt;new.target&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 Person() {
  this.age = 0;

  setInterval(() =&amp;gt; {
    this.age++; //the use of `this` refers to the Person object
  }, 1000);
}

let sequence = new Person();
console.log(sequence);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In ordinary function, this approach is different due to their working principles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Person() {
  // define this as a variable 
  const self = this;
  self.age = 0;

  setInterval(function growUp() {
    // The callback refers to the `self` variable as the Person object
    self.age++;
  }, 1000);
}
const incr = new Person();
console.log(incr) //1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;del&gt;next step&lt;/del&gt; doesn't perform the function of this in object js.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Person() {
  // The Person() constructor defines `this` as itself.
  this.age = 0;

  setInterval(function ageBracket() {
/*In nonstrict mode, the ageBracket() function defines `this` as the global object, which is different from the `this` defined by the Person() constructor, so then this result to zero as defined */
    this.age++;
  }, 1000);
}

const incr = new Person();
console.log(incr) //0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Loop js simplicity</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Sat, 15 Apr 2023 11:48:20 +0000</pubDate>
      <link>https://dev.to/ebakecode/loop-js-simplicity-1kj7</link>
      <guid>https://dev.to/ebakecode/loop-js-simplicity-1kj7</guid>
      <description>&lt;h2&gt;
  
  
  JavaScript loop
&lt;/h2&gt;

&lt;p&gt;This is a mechanism or step to execute a piece of code repeatedly. &lt;/p&gt;

&lt;p&gt;This usally have starting point and ending point or it could run continuously non stop(which could lead to memory loss). Its mostly occur in an &lt;code&gt;array&lt;/code&gt;.&lt;br&gt;
&lt;em&gt;They are different types of loop, which initially perform the same task by repeating an action number of times(0-10000) or continuously.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Generally a loop should contain&lt;/strong&gt;&lt;/u&gt; &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initial expression(more like an initial value of a parameter)&lt;/li&gt;
&lt;li&gt; Condition (more like on what bases should you carry out a task)&lt;/li&gt;
&lt;li&gt; Increasing or descending order ( more like when the code has perform the first task, then rerun again e.g automating a dice game 100 times)&lt;/li&gt;
&lt;li&gt;Statement of execution (more like further adding features or certain conditions )&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Types of loop JavaScript js
&lt;/h2&gt;

&lt;p&gt;Loop js iterates a program or code.&lt;br&gt;
&lt;strong&gt;Iteration is a single execution of a loop body.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. do while loop:
&lt;/h2&gt;

&lt;p&gt;This execute a task in an infinite number of times except the condition is false, the execution ends.&lt;/p&gt;

&lt;p&gt;_In order to run multiple statement, block ({ }) is use to group them.&lt;br&gt;
_&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;do{
//statement of task
} while (//condition);

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9s4ikawod1tkl0qweqs8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9s4ikawod1tkl0qweqs8.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. while loop:
&lt;/h2&gt;

&lt;p&gt;This is similar to do-while loop. If &lt;code&gt;i++&lt;/code&gt; is not included, it will loop forever, therefore causing storage issue in the browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2p37fad9xlxyx0kypu3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2p37fad9xlxyx0kypu3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Counter iterators:break &amp;amp; continue
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Break:&lt;/strong&gt;&lt;br&gt;
This terminate loop and switch immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftz2qgfbpnqc6vmazr7af.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftz2qgfbpnqc6vmazr7af.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Note: generally if the loop is being executed, it stop running if the condition is false contrary to the condition imply. Also if using prompt; when cancel is click, it end the program.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Continue:&lt;/strong&gt;&lt;br&gt;
This omit the condition and restore the loop (&lt;code&gt;do while&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, &lt;code&gt;for&lt;/code&gt;).&lt;br&gt;
It help restart the loop when another condition is met(more like rerun after a part in a condition is obtained and keep working).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhf3vfnfivkh0vz9wdju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhf3vfnfivkh0vz9wdju.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Labelled statement:&lt;/strong&gt;&lt;br&gt;
This is a statement use to &lt;code&gt;break&lt;/code&gt; or &lt;code&gt;continue&lt;/code&gt;  a loop. It helps to break or continue multiple nested loop at once.&lt;br&gt;
It works two ways or both ways; clear example &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcfgtr0jiq14e14e3b8rf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcfgtr0jiq14e14e3b8rf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. for loop:
&lt;/h2&gt;

&lt;p&gt;it's execute task fixed number of times.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnotik19q71z8o346ivvs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnotik19q71z8o346ivvs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. for of loop:
&lt;/h2&gt;

&lt;p&gt;This loops through the values of an iterable &lt;code&gt;object&lt;/code&gt; and over iterable data structures such as &lt;code&gt;arrays&lt;/code&gt;, &lt;code&gt;strings&lt;/code&gt;, &lt;code&gt;maps&lt;/code&gt;, &lt;code&gt;nodeLists&lt;/code&gt;, and more.&lt;br&gt;
&lt;em&gt;Note: this help returns items with previous item when using increments.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2vkr0d18ghyf0yxinj2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2vkr0d18ghyf0yxinj2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;forEach:&lt;/strong&gt;&lt;br&gt;
This is a method in &lt;code&gt;array&lt;/code&gt; that calls a function once for each array element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jwzuwkq0qu5oky51l7e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9jwzuwkq0qu5oky51l7e.png" alt="Image description"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  5. for in loop:
&lt;/h2&gt;

&lt;p&gt;This loop the properties of an object.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw9ocj74tz2ou2v156q1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftw9ocj74tz2ou2v156q1.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Review articles on function JavaScript
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev.to/ebakecode/function-js-javascript-complete-guide-2ih1"&gt;Beginner function&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/ebakecode/function-js-javascript-advance-principles-1je0"&gt;Advance function&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Let us connect with each other
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;connection between two or more parties bring solution to a problem &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/edekeemmanuel/" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ebakecode/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/EBakeCode" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://instagram.com/ebakecode" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://facebook.com/ebakecode" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>career</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Clarity on logical operator js</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Fri, 24 Mar 2023 18:41:40 +0000</pubDate>
      <link>https://dev.to/ebakecode/clarity-on-logical-operator-js-416</link>
      <guid>https://dev.to/ebakecode/clarity-on-logical-operator-js-416</guid>
      <description>&lt;p&gt;Logical Operator JavaScript(LOJ) is very much familiar with logic gate, if you are computer scientist or mathematician, this will be friendly with you. &lt;u&gt;Nevertheless I am not one, so meaning you can understand it too.&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The main focus will be on LOJ but let check out brief explanation on logic gate.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Logic gates
&lt;/h1&gt;

&lt;p&gt;logic gate is the principle of any digital system. It used to perform logical operations on single or multiple binary inputs and return(result) one binary output.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a basic concept in the studies of electronic and digital service mainly based on the concept of boolean function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Types of logic gate
&lt;/h2&gt;

&lt;p&gt;Computer is program to understand only boolean function or binary system; which are only 0 (False or No) and 1 (True or Yes).&lt;/p&gt;

&lt;h3&gt;
  
  
  1. AND gate:
&lt;/h3&gt;

&lt;p&gt;In the result or output, it always return &lt;strong&gt;False&lt;/strong&gt; (0) but if both the input are True (1), then the output is &lt;strong&gt;True&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qj6Fs8f6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84gf39x33a7mxzzyjzpx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qj6Fs8f6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84gf39x33a7mxzzyjzpx.jpg" alt="Image description" width="663" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  OR gate:
&lt;/h3&gt;

&lt;p&gt;In the output, it always return &lt;strong&gt;True&lt;/strong&gt; (1) but if both the input are False (0), then the output is &lt;strong&gt;False&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xQQQRLze--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4enjhhdv6txestpmd3ux.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xQQQRLze--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4enjhhdv6txestpmd3ux.jpg" alt="Image description" width="661" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  NOT gate:
&lt;/h3&gt;

&lt;p&gt;The output is always opposite of the input in boolean expression.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y032gMJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxebr7r2pddxyv3ypbe6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y032gMJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxebr7r2pddxyv3ypbe6.jpg" alt="Image description" width="653" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;combine gate is the joining of many gate together, which are:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  NAND gate:
&lt;/h4&gt;




&lt;p&gt;The output is always the opposite of the output of the AND gate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--11wZwu5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilwab8yxuu8psp7vu2j2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--11wZwu5R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ilwab8yxuu8psp7vu2j2.jpg" alt="Image description" width="647" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  NOR gate:
&lt;/h4&gt;

&lt;p&gt;The output is always the opposite of the output of the OR gate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o-svkesn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aq74qzmsn85pafdm92eh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o-svkesn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aq74qzmsn85pafdm92eh.jpg" alt="Image description" width="663" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  XOR gate:
&lt;/h5&gt;

&lt;p&gt;In the output, it always return True but if both the input are either False or True, then the output is False. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZFfo7CS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7f6p4ccihhfxhrs4ifu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6ZFfo7CS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7f6p4ccihhfxhrs4ifu.jpg" alt="Image description" width="660" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  XNOR gate:
&lt;/h5&gt;

&lt;p&gt;In the output, always return False but if both the input are either False or True, then the output is True.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UR-7hOcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plvlpenqilkke83zbs2m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UR-7hOcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/plvlpenqilkke83zbs2m.jpg" alt="Image description" width="664" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Diagramatic operation of logic gates&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Os63oE5t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imwzzkaxlvq63dpvo5a7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Os63oE5t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/imwzzkaxlvq63dpvo5a7.png" alt="Image description" width="511" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M0Q5x-2v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/547ggpmtyoafdjh1f6t5.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M0Q5x-2v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/547ggpmtyoafdjh1f6t5.jpeg" alt="Image description" width="462" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Logical operator js
&lt;/h1&gt;

&lt;p&gt;JavaScript Logical operator allows us to compare the expressions/arguments/statements between variables or values.&lt;/p&gt;

&lt;p&gt;It can also be used to control a boolean or set termination conditions for loops.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of logical operator js
&lt;/h2&gt;

&lt;h3&gt;
  
  
  - And operator ( &amp;amp;&amp;amp; )
&lt;/h3&gt;

&lt;p&gt;:&lt;br&gt;
The &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; operator compares two expressions. If the first is express as true value, the result will be the value of the second expression. If the first is express as false value, the result will be the value of the first expression.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lYFmVIUP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rw60zz94c6ano9ebgy8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lYFmVIUP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rw60zz94c6ano9ebgy8c.png" alt="Image description" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This simply means always return &lt;code&gt;false&lt;/code&gt; except both condition are true.&lt;/p&gt;
&lt;h3&gt;
  
  
  Or operator ( || ):
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;||&lt;/code&gt; operator compares two expressions. If the first is express as false value, the result will be the value of the second expression. If the first is express as true value, the result will be the value of the first expression.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qcGJ6TjI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9768nw5c3v7ylha9p8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qcGJ6TjI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s9768nw5c3v7ylha9p8l.png" alt="Image description" width="800" height="651"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This simply means always return &lt;code&gt;true&lt;/code&gt; except both condition are false.&lt;/p&gt;
&lt;h3&gt;
  
  
  Not operator ( ! ):
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;!&lt;/code&gt; operator always return (output) the inverse of the argument of either false or true value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qakJDPbw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fu0umfyhft5a2d7l7vxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qakJDPbw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fu0umfyhft5a2d7l7vxc.png" alt="Image description" width="800" height="900"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Nullish coalescing operator ( ?? ):
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;??&lt;/code&gt; operator always return the first argument (that is define), if it is not null or undefined.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y_EOwCsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqvdg8al6kgrs6h1n4up.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y_EOwCsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gqvdg8al6kgrs6h1n4up.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The difference between &lt;code&gt;??&lt;/code&gt; and &lt;code&gt;||&lt;/code&gt; is that the &lt;code&gt;??&lt;/code&gt; returns the first define value while &lt;code&gt;||&lt;/code&gt; returns the first true value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E5eunQOh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q486j9gli2twi84a96xm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E5eunQOh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q486j9gli2twi84a96xm.png" alt="Image description" width="630" height="670"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Optional Chaining Operator ( ?. ):
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;?.&lt;/code&gt; operator returns undefined, if item or value in object is undefined or null, instead of throwing syntax error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DgXtMV7B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxvcrhy0k6eifsh5gnu0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DgXtMV7B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lxvcrhy0k6eifsh5gnu0.png" alt="Image description" width="800" height="797"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In precedence And operator &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; is higher than Or operator &lt;code&gt;||&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;Is coding hard ?&lt;/del&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("coding is easy with support from community and great articles like mine");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Coding is a process, needs time, dedication and continual practices (keep doing projects), then you are at the peak of perfection.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/computer_logical_organization/logic_gates.htm"&gt;Furthermore explanation on logic gate&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let us connect with each other
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;connection between two or more parties bring solution to a problem &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/edekeemmanuel/"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ebakecode/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/EBakeCode"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://instagram.com/ebakecode"&gt;Instagram&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://facebook.com/ebakecode"&gt;Facebook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ebakecode.web.app/"&gt;ebakecode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Data types conversion in JavaScript</title>
      <dc:creator>Edeke Emmanuel</dc:creator>
      <pubDate>Sat, 21 May 2022 16:36:21 +0000</pubDate>
      <link>https://dev.to/ebakecode/data-type-conversion-in-javascript-2chl</link>
      <guid>https://dev.to/ebakecode/data-type-conversion-in-javascript-2chl</guid>
      <description>&lt;h2&gt;
  
  
  *&lt;em&gt;Changing value from one data types to another *&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;conversion of the value of the declare variable to a different data types can be done by ensuring that the data type to be converted to, is the one used and begins with a Capital letter. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let year = String(1980); 
console.log(year);  //"1980"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xBkiGPTZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40nb9jg82kf0xeigbf8i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xBkiGPTZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40nb9jg82kf0xeigbf8i.png" alt="methods" width="796" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Generally: let x = Data-types(value);&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;List of Data-types&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Number&lt;/li&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Boolean &lt;em&gt;e.t.c&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;JavaScript has some in built conversion one can explore without the use of methods:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let result;
//For example =&amp;gt;
// String conversion
result = '3' + 2;  // "32"
result = '10' + true;  //"10true"

//Number conversion
result = '10' - '2'; // 8 
result = '10' - 2; //8

//NaN conversion
result = 'hello' - 'world'; // NaN 
result = '4' - 'hello'; //NaN

//Boolean conversion
result = '8' - true;  // 7 
result = 4 + true; //5

//Null conversion
result = 15 + null;  // 15
result = 4 - null; //4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To check what type of data type, make use of&lt;/strong&gt; &lt;code&gt;typeof&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;console.log(typeof(num)); //Number

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;while with method&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;/* convert to number */&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;string can be converted to number using &lt;code&gt;Number&lt;/code&gt; keyword even other data types such as boolean and null in JavaScript. &lt;br&gt;
for example: &lt;br&gt;
&lt;code&gt;true&lt;/code&gt; is known as &lt;code&gt;1&lt;/code&gt; while &lt;code&gt;false&lt;/code&gt;, empty string &lt;code&gt;""&lt;/code&gt; and &lt;code&gt;null&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt; or empty value. &lt;br&gt;
A text, &lt;code&gt;NaN&lt;/code&gt; and &lt;code&gt;undefined&lt;/code&gt; will return Not a number &lt;code&gt;NaN&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VF8AdZ4Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyner44iisn6naaioov5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VF8AdZ4Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyner44iisn6naaioov5.png" alt="Number Conversion" width="830" height="524"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;/* method in Number*/&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;some specific method can be used to convert one data types to a number. Method like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. parseInt()
2. parseFloat()
3. /*unary operator*/ +"" 
4. Math.floor()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;example:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j3fpdzJ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5y1b0wfspd4lewz8l57b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j3fpdzJ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5y1b0wfspd4lewz8l57b.png" alt="Number Conversion using methods" width="880" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;/* convert to string */&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;conversion to string is  done with &lt;code&gt;String /*or*/ toString()&lt;/code&gt;. example: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H5hh4rbk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d46lvcfxeaxthbg3o6wg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H5hh4rbk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d46lvcfxeaxthbg3o6wg.png" alt="String Conversion" width="846" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;&lt;em&gt;/* convert to boolean */&lt;/em&gt;&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;empty &lt;code&gt;string&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;, &lt;code&gt;undefined&lt;/code&gt;, &lt;code&gt;NaN&lt;/code&gt; and &lt;code&gt;null&lt;/code&gt; return &lt;code&gt;false&lt;/code&gt; when passed with boolean but others return &lt;code&gt;true&lt;/code&gt;. &lt;br&gt;
example: &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--goE189HS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c771cnd3zjybg6y9bnff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--goE189HS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c771cnd3zjybg6y9bnff.png" alt="Boolean Conversion" width="796" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let us connect with each other
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;connection between two or more parties bring solution to a problem &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://github.com/edekeemmanuel/"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/in/ebakecode/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/EBakeCode"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://web.facebook.com/EBakeCode"&gt;Facebook&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ebakecode.web.app/"&gt;ebakecode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
