<?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: Osama</title>
    <description>The latest articles on DEV Community by Osama (@osam1010).</description>
    <link>https://dev.to/osam1010</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%2F815179%2F40dc1156-d25a-4042-8f0f-f61b62214460.jpg</url>
      <title>DEV Community: Osama</title>
      <link>https://dev.to/osam1010</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/osam1010"/>
    <language>en</language>
    <item>
      <title>How To Choose The Right Framework For Your Next Node.js App.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Fri, 23 Sep 2022 15:02:34 +0000</pubDate>
      <link>https://dev.to/osam1010/how-to-choose-the-right-framework-for-your-next-nodejs-app-2c1e</link>
      <guid>https://dev.to/osam1010/how-to-choose-the-right-framework-for-your-next-nodejs-app-2c1e</guid>
      <description>&lt;h2&gt;
  
  
  How To Choose The Right Framework For Your Next Node.js App.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Choosing the proper framework that suits your needs is one of the most important things you need to do before doing anything, Express is a great choice but there are a few alternatives that can do better for you.
&lt;/h3&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AyyP6c8KfRLSwCeY8.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AyyP6c8KfRLSwCeY8.png" alt="Ctto : [dev.to](https://www.google.com/url?sa=i&amp;amp;url=https%3A%2F%2Fdev.to%2Fdhiwise%2F10-best-practices-every-nodejs-developer-must-follow-362m&amp;amp;psig=AOvVaw1vR3e901nCNfPdRW6LaxQF&amp;amp;ust=1663842772109000&amp;amp;source=images&amp;amp;cd=vfe&amp;amp;ved=0CA0QjhxqFwoTCLjBrubxpfoCFQAAAAAdAAAAABAI)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a web framework:
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A web framework or web application framework is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. wiki&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can think of a web framework as a tool that helps you build your app in a good way and make it fully featured, secure and Fast.&lt;/p&gt;

&lt;p&gt;There are a lot of web frameworks in the town, especially for Node.Js, So the questions are, What is the best web framework and How to choose the one that suits your need?&lt;/p&gt;

&lt;p&gt;in this article, I’ll try to answer these questions, though it’s up to you to decide which is the best and which suites you, all I’m trying to do here is to give you a simple and brief introduction of each popular framework and its Pros &amp;amp; cons, and I added at the end of the article some links that make comparisons between those frameworks so that you can choose the right one for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you choose the right framework for your App:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;what is the purpose of the app? is it an API you want to expose to the public? is it an E-commerce app where reliability and performance matter the most? is it a full stack solution and may need to convert it to a mobile app? is your project a small level, med level or enterprise level?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always go with the framework that is easy to install and use and has the biggest community support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you need your app to be scalable? will you often add more features?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do you have a lot of time to spend learning the new framework? or do you want something very quickly to start with?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always go to the one that has better documentation, so that you will face less problems and spend more time developing the app&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What Are the Hosting Prerequisites of the Framework?&lt;br&gt;
Use frameworks that agree with the hosting requirements of the app you are developing. Some frameworks work well only with shared hosting plans.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Always try to avoid the complex and hard-to-understand framework, unless you want it for other benefits that you need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ease of Creating an Extension and Availability&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Enough Talk let’s get to work!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Express:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A3XQsrk9L481h3Wzm.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A3XQsrk9L481h3Wzm.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Express.js, or simply Express, is a back end web application framework for build RESTful APIs with Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs. It has been called the de facto standard server framework for Node.js&lt;br&gt;
&lt;a href="https://expressjs.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Express - Node.js web application framework&lt;/strong&gt;&lt;br&gt;
*Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and…*expressjs.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Great community.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;huge support for many third-party plugins&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;unopinionated (this is an advantage and disadvantage too)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;simple and powerful rooted API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;great and detailed documentation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Great support for middleware patterns&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;lack of standardization, due to its unopinionated structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;callback hell&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Express.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;uber&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;twitter&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PayPal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IMDB&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Netflix&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Koa:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2280%2F0%2AyyEy9lzCM9pvepku.jpeg" 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%2Fcdn-images-1.medium.com%2Fmax%2F2280%2F0%2AyyEy9lzCM9pvepku.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs. By leveraging async functions, Koa allows you to ditch callbacks and greatly increase error-handling. Koa does not bundle any middleware within its core, and it provides an elegant suite of methods that make writing servers fast and enjoyable. &lt;a href="https://koajs.com/" rel="noopener noreferrer"&gt;site&lt;/a&gt;&lt;br&gt;
&lt;a href="https://koajs.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Koa - next-generation web framework for node.js&lt;/strong&gt;&lt;br&gt;
*A Koa Request object is an abstraction on top of the node's vanilla request object, providing additional functionality that…*koajs.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;lightweight&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generator support from the ground up&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;no callback hell&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;modular structure, for example, rather than having a body parser as a middleware, you have it as a function&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;greater error-handling with try-catch&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;the community is relatively small&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;not compatible with the middleware style&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Koa uses generators which are not compatible with any other type of Node.js framework middleware.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Koa.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;brainhub&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;bulb&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;gapo&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pier&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hapi:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AFoe4D6_QOA5In1uH.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AFoe4D6_QOA5In1uH.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Hapi.js (derived from Http-API) is an open-source Node.js framework used to build powerful and scalable web applications. Hapi is commonly used to build Application Programming Interface servers, HTTP-proxy applications, and websites. Hapi.js was created by the mobile team at Walmart Labs — led by Eran Hammer to handle their traffic for events like Black Friday, which is by far one of the busiest days for online shopping on the U.S. calendar. Hapi was originally built using the express framework before facing challenges that drove Walmart to make hapi, its own stand-alone framework. &lt;a href="https://www.section.io/engineering-education/introduction-to-hapi/" rel="noopener noreferrer"&gt;source&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Robust plugins&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;secure framework&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;microservices support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;integrated authorization&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ease of coding&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;code configuration, Developers have to figure out the code structure without community support&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;compatibility issues with other frameworks like Express&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;manual testing due to lack of automation&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Hapi.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tech stack&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Beam&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GraphicWeave&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Owlin&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fastify:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AR0uJXleBOxEku7eU.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AR0uJXleBOxEku7eU.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Hapi and Express and as far as we know, it is one of the fastest web frameworks in town. &lt;a href="https://github.com/fastify/fastify" rel="noopener noreferrer"&gt;**source&lt;/a&gt;**&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly performant:&lt;/strong&gt; as far as we know, Fastify is one of the fastest web frameworks in town, depending on the code complexity we can serve up to 30 thousand requests per second.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Extensible:&lt;/strong&gt; Fastify is fully extensible via its hooks, plugins and decorators.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Schema-based:&lt;/strong&gt; even if it is not mandatory we recommend using &lt;a href="https://json-schema.org/" rel="noopener noreferrer"&gt;JSON Schema&lt;/a&gt; to validate your routes and serialize your outputs, internally Fastify compiles the schema in a highly performant function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logging:&lt;/strong&gt; logs are extremely important but are costly; we chose the best logger to almost remove this cost, &lt;a href="https://github.com/pinojs/pino" rel="noopener noreferrer"&gt;Pino&lt;/a&gt;!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer friendly:&lt;/strong&gt; the framework is built to be very expressive and to help developers in their daily use, without sacrificing performance and security.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TypeScript ready:&lt;/strong&gt; we work hard to maintain a &lt;a href="https://www.typescriptlang.org/" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt; type declaration file so we can support the growing TypeScript community.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Not widely used in the industry yet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Less documentation exists.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Less community support for debugging.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Fastify.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Armut&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;bee10&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;payever&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;sevensenders&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;R&amp;amp;D&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Nest:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2560%2F0%2AGgoyvb2J4FohtTWx.jpg" 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%2Fcdn-images-1.medium.com%2Fmax%2F2560%2F0%2AGgoyvb2J4FohtTWx.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming). Under the hood, Nest makes use of Express, but also, provides compatibility with a wide range of other libraries, like e.g. Fastify, allowing for easy use of the myriad third-party plugins which are available.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Based on Typescript&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;easy to write simple API&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CLI tool to generate and integrate boilerplate code.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;modular structure&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;allows you to create extensible software solutions where there is no strong coupling between the components.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;**Heavily inspired by angular, **if you not good with angular or at least with typescript, it can be hard for you&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Too much obfuscation&lt;/strong&gt;. With ExpressJS (or Fastify) already fairly simple to use and understand, NestJS takes that too far, forcing you to learn more of what NestJS needs and less about what is going on under the hood.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Too much magic.&lt;/strong&gt; Similar to obfuscation, magic means things just work…until they don’t. There have been several instances of having to fight or work against NestJS to meet a requirement that would normally be straightforward with something like ExpressJS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lacking in features compared to frameworks in other languages such as Spring in Java or .NET in C#.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Nest.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Mak it&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Kevin&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PostClick&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;UniBuddy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ProductBoard&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  IF YOU DECIDE TO GO WITH METEOR FOR YOUR NEXT PROJECT, PLEASE READE THIS ARTICLES
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.wwt.com/article/nestjs-101" rel="noopener noreferrer"&gt;&lt;strong&gt;Our Experience With NestJS&lt;/strong&gt;&lt;br&gt;
*NestJS is an opinionated framework used to build "scalable server-side applications." It is heavily inspired by Angular…*www.wwt.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.davidson.group/blog/nestjs" rel="noopener noreferrer"&gt;&lt;strong&gt;NestJS - Davidson&lt;/strong&gt;&lt;br&gt;
*The JavaScript Enterprise Edition (JsEE)? In a few minutes, you won't be able to do without NestJs. Launched in 2017…*www.davidson.group&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ember
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A15KhxFAYaiXumjq2.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A15KhxFAYaiXumjq2.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A framework for ambitious&lt;br&gt;
web developers.&lt;br&gt;
 Ember.js is a productive, battle-tested JavaScript framework for building modern web applications. It includes everything you need to build rich UIs that work on any device. &lt;a href="https://emberjs.com/" rel="noopener noreferrer"&gt;site&lt;/a&gt;&lt;br&gt;
&lt;a href="https://emberjs.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Ember.js - A framework for ambitious web developers&lt;/strong&gt;&lt;br&gt;
*Some of the best development teams in the world have been iterating on their products for years with Ember. With…*emberjs.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stability&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Community&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Convention over configuration&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ember CLI&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ember Octane — The future of contemporary Ember,&lt;/strong&gt; The team behind Ember has planned to release a new Ember edition every single year. Every single release will focus on a specific theme — one of them is Ember Octane, which is related to performance and productivity. According to the official website, Ember Octane is concerned about performing more with less, which implies that it will be simpler to learn Ember, and the framework will be smaller and faster. Ember Octane will be introducing native JavaScript classes, incremental rendering, tree-shaking, rehydration, and so forth.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not easy to learn&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**Highly opinionated, **This framework is highly opinionated, given that any sort of deviation from performing things might result in frustrating issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sluggishness in popularity&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Ember.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Twitch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Linkedin&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DigitalOacean&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Square&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Backbone
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_56Y_Nse4Nx3Wn36.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_56Y_Nse4Nx3Wn36.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Backbone.js gives structure to web applications by providing &lt;strong&gt;models&lt;/strong&gt; with key-value binding and custom events, &lt;strong&gt;collections&lt;/strong&gt; with a rich API of enumerable functions, &lt;strong&gt;views&lt;/strong&gt; with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. &lt;a href="https://backbonejs.org/" rel="noopener noreferrer"&gt;site&lt;/a&gt;&lt;br&gt;
&lt;a href="https://backbonejs.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;Backbone.js&lt;/strong&gt;&lt;br&gt;
*Backbone.js gives structure to web applications by providing models with key-value binding and custom events…*backbonejs.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;simple and flexible&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;huge community and ecosystem&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;powerful inheritance model&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;MV structure and Abstract Code&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Event-driven communication&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conventions for coding style&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Architecture&lt;/strong&gt;, As Backbone does not have much of an opinion, architecture is unclear at times, which can make it challenging to get up to speed on some things.&lt;br&gt;
Instead of giving a structure, it provides some elemental tools to create a structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Productivity&lt;/strong&gt;, As Backbone is more like a library, which means it doesn’t try to put much of its opinion on you, this also means it doesn’t help you as much and doesn’t write as much of your code for you.&lt;br&gt;
It is not to say you’re not going to be productive with backbone, but you certainly would have more code to write. A significant reason for that would be the lack of 2-way data binding, which is a primary feature many people liked about Angular development and Ember.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory Leaking,&lt;/strong&gt; The biggest drawback of Backbone is that, instead of providing structure, it provides some essential tools to create architecture. So, somewhere you have to depend on developers to decide how to structure the application.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;h3&gt;
  
  
  Companies that Use &lt;strong&gt;Backbone&lt;/strong&gt;.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;uber&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;LinkedIn&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reddit&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pinterest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Coursera&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MasterCard&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Walmart&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Meteor:
&lt;/h2&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AcrOE3miVqLaCCa42.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AcrOE3miVqLaCCa42.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Meteor is &lt;strong&gt;a full-stack JavaScript platform for developing modern web and mobile applications&lt;/strong&gt;. Meteor includes a key set of technologies for building connected-client reactive applications, a build tool, and a curated set of packages from the Node. js and general JavaScript community.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Pros:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full-Stack javascript framework&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reactivity&lt;/strong&gt;, changes in the database will be sent to the client immediately, thanks to socket.io, Put simply, in case someone under your article posts a comment; it would be possible for you to see it instantly without any need to reload the page&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It means that every change of data in the database is instantly mirrored by a change happening on the user’s screen&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;One language to develop a whole platform&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Convert your Meteor JS app into Android and iOS apps,&lt;/strong&gt; Thanks to Cordova&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supportive and active community&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Cons:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;An excessive amount of dependency is placed by the developers on various prebuilt packages, which can conflict.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It might be easier to use Express or any web framework if you are simply making a web app.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not-so-obvious way of deployment to own server&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No native server-side rendering (useful for SEO)&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Companies that Use Meteor.js:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Qualcomm&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IKEA&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Honeywell&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dispatch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rocket.chat&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MixMax&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  IF YOU DECIDE TO GO WITH METEOR FOR YOUR NEXT PROJECT, PLEASE READE THIS ARTICLE
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.netvlies.nl/blogs/front-end-developers-short-trip-meteorjs-full-stack-javascript-framework-english" rel="noopener noreferrer"&gt;&lt;strong&gt;StackPath&lt;/strong&gt;&lt;br&gt;
*Edit description*www.netvlies.nl&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  My personal opinion:
&lt;/h2&gt;

&lt;p&gt;for creating open API or Back-end apps/servers I’ll go with Express because it offers me simplicity, security, Fast, ease of development and most importantly the support for middleware, which I use a lot.&lt;/p&gt;

&lt;p&gt;But if I’m working with a Full-stack app that needs to be cross-platform, then definitely Meteor is where to go, you can even create IOS and android app versions from the same app you made using meteor, I used meteor before and it was great though it has some annoying drawbacks, but still a good choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preferences :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://medium.com/savvycom/the-best-node-js-framework-koa-vs-express-vs-hapi-detailed-comparison-46cc85207d65" rel="noopener noreferrer"&gt;&lt;strong&gt;The Best Node.js Framework: Koa VS Express VS Hapi [Detailed Comparison]&lt;/strong&gt;&lt;br&gt;
*Since its launch in 2009, Node.js has become one of the fastest-growing open-source, cross-platform Javascript run-time…*medium.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.logrocket.com/forget-express-js-opt-for-these-alternatives-instead/" rel="noopener noreferrer"&gt;&lt;strong&gt;Forget Express.js - opt for these alternatives instead - LogRocket Blog&lt;/strong&gt;&lt;br&gt;
*Node.js offers some powerful primitives when it comes to building HTTP servers. By default, you get a function that…*blog.logrocket.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.slant.co/options/1277/alternatives/~express-js-alternatives" rel="noopener noreferrer"&gt;https://www.slant.co/options/1277/alternatives/~express-js-alternatives&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://javascript.plainenglish.io/top-node-js-framework-for-web-apps-in-2022-e538bae93c72" rel="noopener noreferrer"&gt;&lt;strong&gt;Top Node.js Frameworks For Web Apps In 2022&lt;/strong&gt;&lt;br&gt;
*6 Best Node.js Framework For Web Apps in 2022*javascript.plainenglish.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.simform.com/blog/best-nodejs-frameworks/" rel="noopener noreferrer"&gt;&lt;strong&gt;12 Best Nodejs Frameworks for App Development in 2022&lt;/strong&gt;&lt;br&gt;
*This post introduces you to the best Node.js Frameworks in 2022 for web and mobile apps. Explore in detail to view…*www.simform.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.thetechblog.org/expressjs-alternatives/" rel="noopener noreferrer"&gt;&lt;strong&gt;Top 10 Best ExpressJS Alternatives In 2022 - The Tech Blog&lt;/strong&gt;&lt;br&gt;
*Top 10 Best ExpressJS Alternatives In 2022. This post will explain expressjs alternatives. This essay will look at ten…*www.thetechblog.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.clickittech.com/developer/nodejs-frameworks/" rel="noopener noreferrer"&gt;&lt;strong&gt;Top NodeJS Frameworks for 2022&lt;/strong&gt;&lt;br&gt;
*Nodejs is a leading software development technology with a wide range of frameworks. These frameworks come with…*www.clickittech.com&lt;/a&gt;&lt;br&gt;
&lt;a href="https://savvycomsoftware.com/express-koa-or-hapi-better-performance-with-the-right-nodejs-framework/" rel="noopener noreferrer"&gt;&lt;strong&gt;The Best Node.js Framework: Koa VS Express VS Hapi [Comparison]&lt;/strong&gt;&lt;br&gt;
*Since its launch in 2009, Node.js has become one of the fastest-growing open-source, cross-platform Javascript run-time…*savvycomsoftware.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cubettech.com/resources/blog/introduction-to-koa-javascript-koa-js-pros-and-cons/" rel="noopener noreferrer"&gt;&lt;strong&gt;What is Koa Javascript (Koa Js)? | node js web development | Blog&lt;/strong&gt;&lt;br&gt;
*Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more…*cubettech.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.simform.com/blog/express-vs-hapi/" rel="noopener noreferrer"&gt;&lt;strong&gt;Express vs. Hapi: The Battle For Being Best Node.js Framework&lt;/strong&gt;&lt;br&gt;
*Express and Hapi are both based on Node.Js at the core, and that is why it becomes a challenge to choose one of them…*www.simform.com&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or this series, I appreciate any feedbacks to improve My content.&lt;/p&gt;

&lt;p&gt;Find me on &lt;a href="https://twitter.com/Osam1010" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>node</category>
    </item>
    <item>
      <title>Advanced Node.js Topics: Caching.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Sun, 31 Jul 2022 07:56:00 +0000</pubDate>
      <link>https://dev.to/osam1010/advanced-nodejs-topics-caching-46a1</link>
      <guid>https://dev.to/osam1010/advanced-nodejs-topics-caching-46a1</guid>
      <description>&lt;h3&gt;
  
  
  Improve your Server Performance By Caching often Fetched Data using Redis.
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Redis is an in-memory database that stores data in key: value format, since it’s in memory, it's ridiculously fast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redis provides data structures such as strings, hashes, lists, sets, sorted sets&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Redis is an open source (BSD licensed), in-memory &lt;strong&gt;data structure store&lt;/strong&gt; used as a database, cache, message broker, and streaming engine. Redis provides data structures such as &lt;a href="https://redis.io/topics/data-types-intro#strings" rel="noopener noreferrer"&gt;strings&lt;/a&gt;, &lt;a href="https://redis.io/topics/data-types-intro#hashes" rel="noopener noreferrer"&gt;hashes&lt;/a&gt;, &lt;a href="https://redis.io/topics/data-types-intro#lists" rel="noopener noreferrer"&gt;lists&lt;/a&gt;, &lt;a href="https://redis.io/topics/data-types-intro#sets" rel="noopener noreferrer"&gt;sets&lt;/a&gt;, &lt;a href="https://redis.io/topics/data-types-intro#sorted-sets" rel="noopener noreferrer"&gt;sorted sets&lt;/a&gt; with range queries, &lt;a href="https://redis.io/topics/data-types-intro#bitmaps" rel="noopener noreferrer"&gt;bitmaps&lt;/a&gt;, &lt;a href="https://redis.io/topics/data-types-intro#hyperloglogs" rel="noopener noreferrer"&gt;hyperloglogs&lt;/a&gt;, &lt;a href="https://redis.io/commands/geoadd" rel="noopener noreferrer"&gt;geospatial indexes&lt;/a&gt;, and &lt;a href="https://redis.io/topics/streams-intro" rel="noopener noreferrer"&gt;streams&lt;/a&gt;. Redis has built-in &lt;a href="https://redis.io/topics/replication" rel="noopener noreferrer"&gt;replication&lt;/a&gt;, &lt;a href="https://redis.io/commands/eval" rel="noopener noreferrer"&gt;Lua scripting&lt;/a&gt;, &lt;a href="https://redis.io/topics/lru-cache" rel="noopener noreferrer"&gt;LRU eviction&lt;/a&gt;, &lt;a href="https://redis.io/topics/transactions" rel="noopener noreferrer"&gt;transactions&lt;/a&gt;, and different levels of &lt;a href="https://redis.io/topics/persistence" rel="noopener noreferrer"&gt;on-disk persistence&lt;/a&gt;, and provides high availability via &lt;a href="https://redis.io/topics/sentinel" rel="noopener noreferrer"&gt;Redis Sentinel&lt;/a&gt; and automatic partitioning with &lt;a href="https://redis.io/topics/cluster-tutorial" rel="noopener noreferrer"&gt;Redis Cluster&lt;/a&gt;. &lt;a href="https://redis.io/docs/about/" rel="noopener noreferrer"&gt;redi.io&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  case use:
&lt;/h2&gt;

&lt;p&gt;Why you should implement caching layer in your server and how it will improve the performance of the application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Regular fetched data&lt;br&gt;
caching data that gets fetched too often is a good practice, you won’t let users wait too long to get basic data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduce query exec against the database&lt;br&gt;
by using caching you will reduce the number of queries that will be executed against the database, aside from the performance improvement you’ll get, you also save your database from being overwhelmed with duplicate queries that return the same result.&lt;br&gt;
also, you will save your precious bandwidth if you are hosting your app at an expensive hosting provider&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improving the app performance&lt;br&gt;
caching will not only improve your database performance and protect it, but it will also improve the overall server-client performance.&lt;br&gt;
to get the idea let's assume your server has a route called getArticle, every request that comes to this route will take about half a second (~500 ms ) to get the response, with caching the first request will take about half a second or more, but every next request will take about (~20 ms)! Magic right ?!&lt;br&gt;
I’ll prove it using my own app&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Cache vs no Cache:
&lt;/h2&gt;

&lt;p&gt;I did a simple benchmark test on my server (on a single API to see how it takes to complete the request without caching, and re-test the same API with caching to see the improvement.)&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AT7l-zLYC6UDvyNfPiq1xyA.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AT7l-zLYC6UDvyNfPiq1xyA.png" alt="without caching"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the above image shows you, that it took my server more than a second to complete the request, of course, every time I make a request it will take approximately the same time!&lt;/p&gt;

&lt;p&gt;The below image is when I introduced the Caching mechanism to my server’s APIs, you can see the difference in the time by yourself ( i did not change anything in the request)&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ADUpNj-3g9-bWIm2sTb9esw.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ADUpNj-3g9-bWIm2sTb9esw.png" alt="caching introduced"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the time to complete the same request in the upcoming times has been reduced to almost ~10 ml, which is a significant improvement!&lt;/p&gt;

&lt;p&gt;I hope now you're excited about implementing this technique in your own projects.&lt;/p&gt;




&lt;h2&gt;
  
  
  Installation:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install &lt;strong&gt;&lt;em&gt;Redis&lt;/em&gt;&lt;/strong&gt; on your machine
&lt;/h3&gt;

&lt;p&gt;in Linux, you can install it by typing in the terminal&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get -y install redis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;in macOS, in terminal issue the following command&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install redis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;in windows, it's a little bit difficult to get Redis on windows since it’s not officially supported in widows.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Redis is not officially supported on Windows. However, you can install Redis on Windows for development by following the instructions below.&lt;br&gt;
 To install Redis on Windows, you’ll first need to enable  (Windows Subsystem for Linux). &lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install" rel="noopener noreferrer"&gt;WSL2&lt;/a&gt;&lt;br&gt;
WSL2 lets you run Linux binaries natively on Windows. For this method to work, you’ll need to be running Windows 10 version 2004 and higher or Windows 11.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redis.io/docs/getting-started/installation/install-redis-on-windows/" rel="noopener noreferrer"&gt;https://redis.io/docs/getting-started/installation/install-redis-on-windows/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Install node-Redis to your project:
&lt;/h3&gt;

&lt;p&gt;node-Redis is a modern, high-performance client for Node.js.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install redis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now we installed both Redis and node-redis package, let's do simple work with these great tools and then try it in a real-world example!&lt;/p&gt;

&lt;h3&gt;
  
  
  Quick start with Redis:
&lt;/h3&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// IMPORTANT : before you can establish connection to redis,

// you must start the redis-server

const redis = require('redis');

// create client to communicate redis DB

var client = redis.createClient();

client.connect()

// connect and error events

client.on('error', function (err) {

console.log('Something went wrong ', err)

});

client.on('connect', function () {

console.log('Redis Connected!')

});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  connect to Redis server:
&lt;/h3&gt;

&lt;p&gt;To start the Redis server you need to run in the terminal :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;redis-server
&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Am3VFF1YrEAs5Iv4IpCdwtQ.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Am3VFF1YrEAs5Iv4IpCdwtQ.png" alt="start Redis server"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A7SSJ_dwuRdNj5Kj5mWMx9w.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A7SSJ_dwuRdNj5Kj5mWMx9w.png" alt="set() and get()"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Above we created a client and started the connection to Redis server, now we can use all the features.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// used to put data into redis
client.set("key" , "some value")

// used to get data from redis
client.get("key")
// output = "some value"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h2&gt;
  
  
  Real-world example:
&lt;/h2&gt;

&lt;p&gt;the big question now is how can I make use of these simple functions set() and get(), to improve my server performance?&lt;/p&gt;

&lt;p&gt;let’s see my own server (express server to fetch quotes from MongoDB atlas and send it back.)&lt;/p&gt;

&lt;p&gt;This Benchmarking test is from my own Quote API (which will be released soon in RapidAPI), we’ll see how the difference in the time it takes when we request 1000, 3000 and 5000 documents of data, I’ll repeat the test by fetching the same data but from the cache this time.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AWlIStPkrZXLJofgsqsMWFQ.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AWlIStPkrZXLJofgsqsMWFQ.png" alt="1000 documents fetched without caching"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to fetch 1000 documents from the DB took almost 2 seconds&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ACpMabHFxMv2Q-1Rs2zTS8A.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ACpMabHFxMv2Q-1Rs2zTS8A.png" alt="the same 1000 documents fetched from the cache"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But fetching the same amount of data from the cache it only took 25 milliseconds!&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQyVgrhEP96djw4-leWF3Jg.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQyVgrhEP96djw4-leWF3Jg.png" alt="3000 documents fetched without cache"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to fetch 3000 documents from the DB it took almost 4 seconds!&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AJ2O6lES5WuaECApEVQ3VRg.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AJ2O6lES5WuaECApEVQ3VRg.png" alt="3000 documents fetched from the cache"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But fetching the same amount of data from the cache it only took 45 milliseconds!&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AukpN2xdQn6j-MdAFuFHmAw.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AukpN2xdQn6j-MdAFuFHmAw.png" alt="5000 documents fetched without cache"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to fetch 5000 documents from the DB took almost 5 seconds!&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ARCD9m4QawG4ZOXBblzyi9g.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ARCD9m4QawG4ZOXBblzyi9g.png" alt="5000 documents fetched from the cache"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But from the cache, it only took 60 milliseconds!&lt;/p&gt;

&lt;p&gt;Pretty amazing right??&lt;/p&gt;




&lt;h3&gt;
  
  
  The caching mechanism:
&lt;/h3&gt;

&lt;p&gt;caching is simply adding another layer to your server, this layer will intercept the queries that will be executed by your database, it will search if this query is cached before or not, if so it will return the cached data as a response and will not going to send the query to the database, if the query has not been cached before, it will send the query to the database to get executed and then store the result in the cache (Redis) for the upcoming requests.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ASze6sykRanXIf3PD.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ASze6sykRanXIf3PD.png" alt="credits to [Linuxiac](https://linuxiac.com/redis-as-cache/)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So to clarify what we want to do :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;connect the server to Redis using the above code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we want to hijack (intercept, interrupt, call it whatever you want) the process of sending the query to the database so we can decide if this query is cached before or not&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if cached, return the cached data and end the response. Don’t send anything to the database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;if not cached, send the query to get executed and send the result as the response, then store the result in the cache for the new requests.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;First of all, you need to create a new file in your project called cache.js, you can name it whatever you want, in the services directory if you have one, if not just put it anywhere.&lt;/p&gt;

&lt;p&gt;this file will contain all the logic needed by our server to cache data and retrieve data from Redis.&lt;/p&gt;

&lt;p&gt;In the beginning, we’ll need to connect to Redis and make sure it's working fine&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A2HaSV90Nb1amz4TRys2gww.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2A2HaSV90Nb1amz4TRys2gww.png"&gt;&lt;/a&gt;&lt;/p&gt;




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

&lt;p&gt;to store data in Redis we need to give every query a unique and consistent key, so we can retrieve the right query when a request has arrived.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ABw8C3PgUkDzPU5Dh4ktGeA.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ABw8C3PgUkDzPU5Dh4ktGeA.png" alt="Key creation for Redis database"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;basically, every query to any database has filters and options to get particular documents or records.&lt;/p&gt;

&lt;p&gt;we’ll take advantage of this thing and take these filters and turn it into a string&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; JSON.stringfy({ {title : "story"} , {skip : 10} })
    // our key = "{{"title" : "story" }, {"skip" : 10}}"
    // everytime any client will request the data that can be fetched
    // with this query, the server will repsonse with the cached data

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

&lt;/div&gt;



&lt;p&gt;Now we have our key for every query need to be executed in the database, what we’ll do next is to search in Redis for this key, if it does exist, return its value instead of executing the query, if not found, execute the query in the database and store the query result with its key in Redis for next requests and then send the result to the user.&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%2Fcdn-images-1.medium.com%2Fmax%2F2264%2F1%2AJ8RrpcwTaHFbv--rv-Qknw.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%2Fcdn-images-1.medium.com%2Fmax%2F2264%2F1%2AJ8RrpcwTaHFbv--rv-Qknw.png" alt="Redis cached data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// this line will add the data fetched from mongoDB to redis
client.set(key, JSON.stringify(result))
// always remember, Redis only store values as a string or numbers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;h3&gt;
  
  
  Wrap up:
&lt;/h3&gt;

&lt;p&gt;first, you need to create a unique and consistent key for every query.&lt;/p&gt;

&lt;p&gt;second, search in Redis for this key, if it's found, return its value as a result, if not, execute the query and store the result in Redis and lastly send it to the user.&lt;/p&gt;




&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;

&lt;p&gt;The best of all courses to learn node.js in depth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.udemy.com/course/advanced-node-for-developers/?ranMID=39197&amp;amp;ranEAID=SAyYsTvLiGQ&amp;amp;ranSiteID=SAyYsTvLiGQ-EDfB120pgYcJlhkNSEBp4Q&amp;amp;LSNPUBID=SAyYsTvLiGQ&amp;amp;utm_source=aff-campaign&amp;amp;utm_medium=udemyads" rel="noopener noreferrer"&gt;https://www.udemy.com/course/advanced-node-for-developers/?ranMID=39197&amp;amp;ranEAID=SAyYsTvLiGQ&amp;amp;ranSiteID=SAyYsTvLiGQ-EDfB120pgYcJlhkNSEBp4Q&amp;amp;LSNPUBID=SAyYsTvLiGQ&amp;amp;utm_source=aff-campaign&amp;amp;utm_medium=udemyads&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-implement-caching-in-node-js-using-redis" rel="noopener noreferrer"&gt;&lt;strong&gt;How To Implement Caching in Node.js Using Redis | DigitalOcean&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.risingstack.com/redis-node-js-introduction-to-caching/" rel="noopener noreferrer"&gt;&lt;strong&gt;Redis + Node.js: Introduction to Caching - RisingStack Engineering&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/franciscomendes10866/caching-in-node-js-using-redis-2o80"&gt;&lt;strong&gt;Caching in Node.js using Redis&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://medium.com/geekculture/fasten-your-node-js-application-with-a-powerful-caching-mechanism-using-redis-fd76b8aa482f" rel="noopener noreferrer"&gt;&lt;strong&gt;Fasten your Node JS Application with a Powerful Caching Mechanism using Redis&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redis.io/docs/stack/get-started/tutorials/stack-node/" rel="noopener noreferrer"&gt;&lt;strong&gt;Redis OM for Node.js&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or this series, I appreciate any feedback to improve My content.&lt;/p&gt;

&lt;p&gt;find me on &lt;a href="https://twitter.com/Osam1010" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/" rel="noopener noreferrer"&gt;Github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>performance</category>
      <category>programming</category>
    </item>
    <item>
      <title>Docker: Brief Introduction.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Sat, 23 Jul 2022 19:38:58 +0000</pubDate>
      <link>https://dev.to/osam1010/docker-brief-introduction-b0a</link>
      <guid>https://dev.to/osam1010/docker-brief-introduction-b0a</guid>
      <description>&lt;h2&gt;
  
  
  Docker: Brief Introduction.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Learn about Docker containers, images, installations and everything you need to know about Docker.
&lt;/h3&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%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AqzSopAqbbqCWERcB" 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%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AqzSopAqbbqCWERcB" alt="from [cloud savvy IT](https://www.google.com/url?sa=i&amp;amp;url=https%3A%2F%2Fwww.cloudsavvyit.com%2F10863%2Fhow-to-assess-docker-engine-security%2F&amp;amp;psig=AOvVaw0VnOeDDlQaW2ApB8Ex8-dP&amp;amp;ust=1650285079518000&amp;amp;source=images&amp;amp;cd=vfe&amp;amp;ved=0CA0QjhxqFwoTCOCEltSom_cCFQAAAAAdAAAAABAk)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  About Docker :
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Docker is &lt;strong&gt;an open source containerization platform&lt;/strong&gt;. It enables developers to package applications into containers — standardized executable components combining application source code with the operating system (OS) libraries and dependencies required to run that code in any environment. &lt;a href="https://www.ibm.com/in-en/cloud/learn/docker" rel="noopener noreferrer"&gt;IBM&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;in simple words :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Docker is &lt;strong&gt;an application build and deployment tool&lt;/strong&gt;. It is based on the idea of that you can package your code with dependencies into a deployable unit called a container. Containers have been around for quite some time. &lt;a href="https://www.nebulaworks.com/insights/posts/what-is-docker-a-simple-explanation/" rel="noopener noreferrer"&gt;nebula works&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;in nutshell :&lt;/p&gt;

&lt;p&gt;You experience this situation, The code works perfectly in my machine, but it doesn’t in others machines.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AaGL8z5uIidZLYtJZK5UMAg.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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AaGL8z5uIidZLYtJZK5UMAg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the situation of when you shipped the code to production and it didn't work, but it works well in your machine.&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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ALLaVpEBLXOKeH0rOGv6fLg.jpeg" 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%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ALLaVpEBLXOKeH0rOGv6fLg.jpeg" alt="[credit](https://www.linkedin.com/pulse/making-works-my-machine-great-thing-hear-koon-emba-psm-pspo-togaf?trk=articles_directory)"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is where Docker introduce itself as the saver for you and your code,&lt;br&gt;
it simply creates a container for your project files, directories, tools and everything your code needs, and that container can be used and run perfectly in any system or machine (your machine or the cloud host).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why use Docker:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Solve the headache of “&lt;em&gt;**It works on my machine…!!”&lt;br&gt;
*&lt;/em&gt;*with the code being in a container, it can be run everywhere&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;a good solution for microservices architecture projects&lt;br&gt;
turn every service of your product into a simple docker container&lt;br&gt;
Containers aren’t required to implement microservices, but they are perfectly suited to the microservices approach and agile development processes generally.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Docker enables faster software delivery cycles&lt;br&gt;
make the process of CI/CD seamlessly and easy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enterprise software must respond quickly to changing conditions. That means both easy scaling to meet demand and easy updating to add new features as the business requires.&lt;br&gt;
 Docker containers make it easy to put new versions of software, with new business features, into production quickly — and to quickly roll back to a previous version if you need to. They also make it easier to implement strategies like blue/green deployments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Main Concepts:
&lt;/h2&gt;

&lt;p&gt;let's dive a little bit into docker and get to know how it works under the hood and what its components.&lt;/p&gt;

&lt;h3&gt;
  
  
  Containers:
&lt;/h3&gt;

&lt;p&gt;A Docker container image is &lt;strong&gt;a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;also, A &lt;strong&gt;container&lt;/strong&gt; is a runnable instance of an image. You can create, start, stop, move, or delete a &lt;strong&gt;container&lt;/strong&gt; using the &lt;strong&gt;Docker&lt;/strong&gt; API or CLI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Image:
&lt;/h3&gt;

&lt;p&gt;A Docker image is &lt;strong&gt;a file used to execute code in a Docker container&lt;/strong&gt;. Docker images act as a set of instructions to build a Docker container, like a template. Docker images also act as the starting point when using Docker. An image is comparable to a snapshot in virtual machine (VM) environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  DockerFile:
&lt;/h3&gt;

&lt;p&gt;A DockerFile is a text file that contains instructions on how to build a docker image. A Dockerfile specifies the operating system that will underlie the container, along with the languages, environmental variables, file locations, network ports, and other components it needs — and what the container will do once we run it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The process of containerization your code:
&lt;/h2&gt;

&lt;p&gt;the process of turning your code into a docker container that can run everywhere is called containerization&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Containerization is OS-based virtualization that creates multiple virtual units in the userspace, known as Containers. Containers share the same host kernel but are isolated from each other through private namespaces and resource control mechanisms at the OS level. geeksforgeeks&lt;br&gt;
 Containerization is an approach to software development in which an application or service, its dependencies, and its configuration (abstracted as deployment manifest files) are packaged together as a container image. The containerized application can be tested as a unit and deployed as a container image instance to the host operating system (OS). microsoft docs&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;hard to understand? in simple words containerization is just an approach to collecting all files and tools and configurations that your project needs in one place, a container, and then you can run, deploy, test and delete your container the way you want from any machine that supports docker&lt;/p&gt;

&lt;p&gt;you'll ship your code and everything it needs in a container, you execute the code inside this container using a docker image, and the Doker file will contain a series of instructions to specify how to build a docker image.&lt;/p&gt;

&lt;p&gt;This is not exactly how things work but I hope you get the main idea!&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation:
&lt;/h2&gt;

&lt;p&gt;to install docker on your machine, read this documentation in docker.com&lt;br&gt;
&lt;a href="https://docs.docker.com/get-docker/" rel="noopener noreferrer"&gt;&lt;strong&gt;Get Docker&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;on Linux:&lt;br&gt;
&lt;a href="https://docs.docker.com/desktop/install/linux-install/" rel="noopener noreferrer"&gt;&lt;strong&gt;Install Docker Desktop on Linux&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;on macOS:&lt;br&gt;
&lt;a href="https://docs.docker.com/desktop/install/mac-install/" rel="noopener noreferrer"&gt;&lt;strong&gt;Install Docker Desktop on Mac&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;on Windows:&lt;br&gt;
&lt;a href="https://docs.docker.com/desktop/install/windows-install/" rel="noopener noreferrer"&gt;&lt;strong&gt;Install Docker Desktop on Windows&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/docker/" rel="noopener noreferrer"&gt;&lt;strong&gt;What is Docker? | AWS&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackify.com/docker-tutorial/" rel="noopener noreferrer"&gt;&lt;strong&gt;Docker Tutorial: Get Going From Scratch&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.geeksforgeeks.org/why-should-you-use-docker-7-major-reasons/" rel="noopener noreferrer"&gt;&lt;strong&gt;Why Should You Use Docker - 7 Major Reasons! - GeeksforGeeks&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Docker vs Kubernetes :&lt;br&gt;
&lt;a href="https://www.theserverside.com/answer/Kubernetes-vs-Docker-Whats-the-difference" rel="noopener noreferrer"&gt;&lt;strong&gt;Kubernetes vs. Docker: What's the difference?&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.dynatrace.com/news/blog/kubernetes-vs-docker/" rel="noopener noreferrer"&gt;&lt;strong&gt;Kubernetes vs Docker: What's the difference?&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://azure.microsoft.com/en-us/topic/kubernetes-vs-docker/" rel="noopener noreferrer"&gt;&lt;strong&gt;Kubernetes vs Docker | Microsoft Azure&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.sumologic.com/blog/kubernetes-vs-docker/" rel="noopener noreferrer"&gt;&lt;strong&gt;Kubernetes Vs Docker | Sumo Logic&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;Home - Docker&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://opensource.com/resources/what-docker" rel="noopener noreferrer"&gt;&lt;strong&gt;What is Docker?&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://index.docker.io/" rel="noopener noreferrer"&gt;&lt;strong&gt;Docker Hub Container Image Library | App Containerization&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or this series, I appreciate any feedback to improve My content.&lt;/p&gt;

&lt;p&gt;find me on &lt;a href="https://twitter.com/Osam1010" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/" rel="noopener noreferrer"&gt;Github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>tutorial</category>
      <category>microservices</category>
      <category>programming</category>
    </item>
    <item>
      <title>Side project: Life-Advise Web App</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Sat, 04 Jun 2022 10:25:02 +0000</pubDate>
      <link>https://dev.to/osam1010/side-project-life-advise-web-app-34e0</link>
      <guid>https://dev.to/osam1010/side-project-life-advise-web-app-34e0</guid>
      <description>&lt;h2&gt;
  
  
  Side Project: Life-Advise Web App
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Offline-first PWA for fetching advice and sending notifications to users.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ab88yVUQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aq5JU7wP70Ho3bsasbiKOOg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ab88yVUQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aq5JU7wP70Ho3bsasbiKOOg.png" alt="[First page](https://life-advise.netlify.app/)" width="880" height="549"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  About the app:
&lt;/h2&gt;

&lt;p&gt;offline first, full-featured quotes and advice generator web app to get some wonderful advice about life, success, money …etc.&lt;br&gt;
&lt;a href="https://life-advise.netlify.app/random"&gt;&lt;strong&gt;Life - Advise&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main goal is to read random advice and quotes, you can save the quote you like and add some notes about it.&lt;/p&gt;

&lt;p&gt;The app will send you daily notifications if you want, the notifications contain random advice and quotes, you can either save it without the need to or open the app, or if you want to see it in the app you can open it and add notes and save it or just see other ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Repos for the app:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/osama865/life-advice-client"&gt;&lt;strong&gt;GitHub - osama865/life-advice-client&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/osama865/life-advise-server"&gt;&lt;strong&gt;GitHub - osama865/life-advise-server&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/osama865/"&gt;&lt;strong&gt;osama865 - Overview&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  App pages:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Favourites:
&lt;/h3&gt;

&lt;p&gt;this page contains your favourite advice, you can modify the note you wrote along with the advice or remove it from the saved.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1it481NT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5r4of62chzlcloo2i3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1it481NT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5r4of62chzlcloo2i3z.png" alt="Saved Page" width="880" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Random:
&lt;/h3&gt;

&lt;p&gt;Fetch random advice from the database and show it to you so you can save it or fetch another one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pnncDKs4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2130/1%2ASEw8tgzH2AyxZ-E_z9vYNg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pnncDKs4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2130/1%2ASEw8tgzH2AyxZ-E_z9vYNg.png" alt="Random page" width="880" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  All :
&lt;/h3&gt;

&lt;p&gt;If you liked the given advice and want to read a lot of them, this page is for you, you can go through hundreds or even thousands of devices, on the random page you only have one piece of advice per time but here there is no limit so feel free and read as much as you want.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E3t2P-EX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2286/1%2AWX_kMGOdrwLpMbRtARJAqQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E3t2P-EX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2286/1%2AWX_kMGOdrwLpMbRtARJAqQ.png" alt="All page" width="880" height="512"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Technologies I used:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Client-Side Technologies:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;react:&lt;/em&gt;&lt;/strong&gt; &lt;br&gt;
My main Stack is MERN where I always use react for building interactive UIs,· Components Based apps with the reusability in mind.&lt;br&gt;
&lt;a href="https://reactjs.org/"&gt;&lt;strong&gt;React - A JavaScript library for building user interfaces&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**react-router:&lt;br&gt;
*A tool that allows you to handle routes in a web app, using dynamic routing&lt;/em&gt;*.&lt;br&gt;
To handle routing and navigation through the app’s pages&lt;br&gt;
&lt;a href="https://reactrouter.com/"&gt;&lt;strong&gt;Declarative routing for React apps at any scale | React Router&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;service workers:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A service worker is a type of web worker. It’s essentially &lt;strong&gt;a JavaScript file that runs separately from the main browser thread, intercepting network requests, caching or retrieving resources from the cache, and delivering push messages&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To make my web app installable and add more features like receiving notifications and taking actions without the need to open up the app.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**PWA:&lt;br&gt;
*&lt;/em&gt;&lt;em&gt;Progressive Web Apps (PWAs) are *web apps that use service workers, manifests, and other web-platform features in combination with progressive enhancement to give users an experience on par with native apps.&lt;/em&gt;&lt;br&gt;
&lt;a href="https://web.dev/progressive-web-apps/"&gt;&lt;strong&gt;Progressive Web Apps&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;IndexedDB and dexie.js:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Indexed Database API is a JavaScript application programming interface provided by web browsers for managing a NoSQL database of JSON objects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I decided to go along with &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API"&gt;indexedDB&lt;/a&gt; for saving user advice over storing users’ favourites on the server for more simplicity and performance and to discover new technologies.&lt;br&gt;
&lt;a href="https://dexie.org/"&gt;&lt;strong&gt;Dexie.js&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;simply when you want to save advice, it will be stored in indexedDB storage and will be fetched whenever you want even when you go offline.&lt;/p&gt;

&lt;p&gt;you can also modify notes, and delete the saved ones without the need for an internet connection (since the indexedDB is browser storage, no data will be transferred over the network).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**Cache:&lt;br&gt;
*&lt;/em&gt;*The backbone of offline applications is the cache, when the app loads for the first time it stores the needed pages in the cache so the next time your pages will be served from the cache instead of the server.&lt;/p&gt;

&lt;p&gt;There are a few cache strategies for your app, here are useful links&lt;br&gt;
&lt;a href="https://blog.bitsrc.io/5-service-worker-caching-strategies-for-your-next-pwa-app-58539f156f52"&gt;&lt;strong&gt;5 Service Worker Caching Strategies for Your Next PWA App&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://medium.com/@brockreece/frontend-caching-strategies-38c57f59e254"&gt;&lt;strong&gt;Frontend caching strategies&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://jsmanifest.com/the-power-of-caching-in-javascript/"&gt;&lt;strong&gt;The Power of Caching in JavaScript&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Notification Part:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oqCtbNS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aw1X7Co-1S-j32SPKjb_lEQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oqCtbNS4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Aw1X7Co-1S-j32SPKjb_lEQ.png" alt="double opt-in a two-step permission request" width="820" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I choose to use &lt;strong&gt;Double opt-in a two-step permission request&lt;/strong&gt; push notification for a good user experience and more. **&lt;br&gt;
**The first pop-up will tell you why the app needs notification permission and when you feel okay with that the real permission request will show to you.&lt;/p&gt;

&lt;p&gt;Why you should always use **double opt-in a two-step permission request:&lt;br&gt;
**it's more user friendly by giving the user a brief description of how your app will use the notification, instead of the ugly standard permission request that tells the user nothing but request to allow or block&lt;/p&gt;

&lt;p&gt;when you use a single opt-in a one-step permission request your users won't be able to know why you need to push notifications for them! maybe they will think you are scamming them and the worst thing that will happen is they will block your site from pushing notifications.&lt;/p&gt;

&lt;p&gt;The opposite goes with double opt-in a two-step permission request when users are aware of why you need notifications and they will be comfier about your app and that increases the chances for your permission request to be allowed&lt;/p&gt;

&lt;p&gt;The most important thing about using double opt-in a two-step permission request is that you’ll have another chance to ask your users for notifications permission.&lt;br&gt;
&lt;a href="https://betterprogramming.pub/everything-you-need-to-know-about-pwas-push-notifications-e870bb54e14f"&gt;&lt;strong&gt;Everything You Need to Know About PWAs — Push Notifications&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.smashingmagazine.com/2020/12/progressive-web-apps/#user-friendly-notifications-and-permission-requests"&gt;&lt;strong&gt;How To Optimize Progressive Web Apps: Going Beyond The Basics - Smashing Magazine&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you click confirm on the first pop-up, the real one appears and asks for permission.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5WGUrZt5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Anm-J7ai-8u0ZaNqgiAP7og.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5WGUrZt5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2Anm-J7ai-8u0ZaNqgiAP7og.png" alt="permission request" width="704" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When allowed, a welcoming sample notification will be sent to you with the unsubscribe option to stop receiving notifications if you're not satisfied with this feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IQRkbDwl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ANM0ZTe2XhHZYiYdFJqO57Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IQRkbDwl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2ANM0ZTe2XhHZYiYdFJqO57Q.png" alt="Welcoming notification with unsubscribe button from this feature" width="479" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typical notifications will look like this one, the advice or the quoted text with who said it or the author.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9jhbc8TN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AqFkFKrYERbeXeqjf-pbrLg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9jhbc8TN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/2000/1%2AqFkFKrYERbeXeqjf-pbrLg.png" alt="usual notification will be like this" width="484" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Buttons :
&lt;/h3&gt;

&lt;p&gt;Save button will add the advice or the quote to your favourite whiteout opening the app. magic right ?!&lt;/p&gt;

&lt;p&gt;The open button will open the app and you will be able to see the clicked advice or quote in the app so you can add notes and save them or see other ones.&lt;/p&gt;

&lt;p&gt;i wish i can add more buttons to the notifications so the user can have more actions to take.&lt;/p&gt;




&lt;h2&gt;
  
  
  Server-side technologies:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Node.js:
&lt;/h3&gt;

&lt;p&gt;Node.js is a free, open-sourced, cross-platform JavaScript run-time environment that lets developers write command-line tools and server-side scripts outside of a browser.&lt;/p&gt;

&lt;p&gt;in the back-end, I’m using node js to run my server code.&lt;br&gt;
&lt;a href="https://nodejs.org/"&gt;&lt;strong&gt;Node.js&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  express.js:
&lt;/h3&gt;

&lt;p&gt;Express is a minimal and flexible &lt;strong&gt;Node&lt;/strong&gt;.&lt;strong&gt;js&lt;/strong&gt; web application framework that provides a robust set of features for web and mobile applications.&lt;/p&gt;

&lt;p&gt;I use express to create endpoints and handle requests and responses with ease&lt;br&gt;
&lt;a href="https://expressjs.com/"&gt;&lt;strong&gt;Express - Node.js web application framework&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  web push:
&lt;/h3&gt;

&lt;p&gt;Web push requires that push messages triggered from a backend be done via the &lt;a href="https://tools.ietf.org/html/draft-ietf-webpush-protocol"&gt;Web Push Protocol&lt;/a&gt; and if you want to send data with your push message, you must also encrypt that data according to the &lt;a href="https://tools.ietf.org/html/draft-ietf-webpush-encryption"&gt;Message Encryption for Web Push spec&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This module makes it easy to send messages and will also handle legacy support for browsers relying on GCM for message sending/delivery.&lt;/p&gt;

&lt;p&gt;I make use of the web-push library to send notifications from my server to the users.&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/web-push"&gt;&lt;strong&gt;web-push&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.section.io/engineering-education/push-notification-in-nodejs-using-service-worker/"&gt;&lt;strong&gt;Getting Started with Push Notifications in Node.js using Service Workers&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  mongodb.js:
&lt;/h3&gt;

&lt;p&gt;The official MongoDB Node.js driver allows Node.js applications to connect to MongoDB and work with data. The driver features an asynchronous API which allows you to interact with MongoDB using Promises or via traditional callbacks.&lt;/p&gt;

&lt;p&gt;I used the mongodb.js driver for simplicity and fast development, it's used to connect your server with your database (mongo atlas for example)&lt;br&gt;
&lt;a href="https://www.npmjs.com/package/mongodb"&gt;*&lt;em&gt;MongoDB official MongoDB driver for Node.js. Upgrading to version 4? Take a look at our upgrade guide here! Think you've…&lt;br&gt;
*&lt;/em&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.mongodb.com/developer/quickstart/node-crud-tutorial/"&gt;&lt;strong&gt;MongoDB and Node.js Tutorial - CRUD Operations&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hevodata.com/learn/node-js-with-mongodb-crud/"&gt;&lt;strong&gt;Node JS with MongoDB CRUD Operations: 6 Easy Steps - Learn | Hevo&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Deployment:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Netlify:
&lt;/h3&gt;

&lt;p&gt;Netlify is &lt;strong&gt;a web development platform that multiplies productivity&lt;/strong&gt;. By unifying the elements of the modern decoupled web, from local development to advanced edge logic, Netlify enables a 10x faster path to much more performant, secure, and scalable websites and apps.&lt;/p&gt;

&lt;p&gt;For me, netlify was always my go-to when it comes to deploying my react or any client-side projects.&lt;/p&gt;

&lt;p&gt;I highly recommend using netlify for its unique features and it makes it easy to deploy and maintain your applications with features like continuous deployment&lt;br&gt;
&lt;a href="https://www.netlify.com/"&gt;&lt;strong&gt;Netlify: Develop &amp;amp; deploy the best web experiences in record time&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://stackabuse.com/guide-to-deploying-a-react-app-to-netlify/"&gt;&lt;strong&gt;Guide to Deploying a React App to Netlify&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Heruko:
&lt;/h3&gt;

&lt;p&gt;Heroku is a container-based cloud Platform as a Service (PaaS). Developers use Heroku &lt;strong&gt;to deploy, manage, and scale modern apps&lt;/strong&gt;. Our platform is elegant, flexible, and easy to use, offering developers the simplest path to getting their apps to market.&lt;/p&gt;

&lt;p&gt;When I want to deploy the node js app, the only host I can think of is heruko.&lt;br&gt;
although it has its cons with the free plan and their pricing is a little more expensive than other solutions but I still like it&lt;br&gt;
&lt;a href="https://devcenter.heroku.com/articles/getting-started-with-nodejs"&gt;&lt;strong&gt;Getting Started on Heroku with Node.js&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.okta.com/blog/2022/02/28/build-deploy-node-app-heroku"&gt;&lt;strong&gt;Build and Deploy a Node.js App to Heroku&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Database:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;MongoDB Atlas:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
MongoDB Atlas is &lt;strong&gt;a fully-managed cloud database that handles all the complexity of deploying, managing, and healing your deployments on the cloud service provider of your choice&lt;/strong&gt; (AWS, Azure, and GCP). MongoDB Atlas is the best way to deploy, run, and scale MongoDB in the cloud.&lt;br&gt;
&lt;a href="https://www.mongodb.com/basics/mongodb-atlas-tutorial"&gt;&lt;strong&gt;MongoDB Atlas Tutorial&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Coming Features :
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Settings page :
&lt;/h3&gt;

&lt;p&gt;make the app fully customised by the user &lt;br&gt;
user can modify the themes and set the notifications numbers per day&lt;br&gt;
personalise tags for advice to get only advice that matter to you ( relationships, success, money, inspiration …etc)&lt;br&gt;
notifications setting like when you like the app to send notifications and also notification sound and if you want to unsubscribe from this feature&lt;br&gt;
as well as what buttons you want to see with the notifications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Search advice:
&lt;/h3&gt;

&lt;p&gt;a small icon that allows you to do a simple search about the advice and its author.&lt;/p&gt;

&lt;h3&gt;
  
  
  Animations:
&lt;/h3&gt;

&lt;p&gt;Make them feel good and work smoothly with animations so the user never gets bored by the strict view.&lt;/p&gt;

&lt;h3&gt;
  
  
  Copy advice:
&lt;/h3&gt;

&lt;p&gt;a small icon that allows you to copy the advice you see and its author and send it to your friends.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create APIs for third-party services:
&lt;/h3&gt;

&lt;p&gt;I want to share my database with other devs, so in future, I’ll Expose APIs for the database so anyone can fetch and use the data there.&lt;/p&gt;

&lt;p&gt;And much more enhancement and improvement in the app performance and make it more customized and user friendly.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;PLEASE&lt;/em&gt;&lt;/strong&gt; if you have any questions or features you want or advice for me to improve my app, or you want to report a bug, feel free to contact me any time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/Osam1010"&gt;Twitter&lt;/a&gt;, &lt;a href="http://osama0000ibrahim@gmail.com"&gt;Email&lt;/a&gt;, here in medium or visit &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Resources That helped me:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://developers.google.com/web/ilt/pwa"&gt;&lt;strong&gt;Progressive Web Apps Training | Google Developers&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://web.dev/progressive-web-apps/"&gt;&lt;strong&gt;Progressive Web Apps&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps"&gt;&lt;strong&gt;Progressive web apps (PWAs) | MDN&lt;/strong&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://firt.dev/pwa-design-tips"&gt;&lt;strong&gt;PWAs Power Tips－firt.dev&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2020/12/progressive-web-apps/"&gt;&lt;strong&gt;How To Optimize Progressive Web Apps: Going Beyond The Basics - Smashing Magazine&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://betterprogramming.pub/everything-you-need-to-know-about-pwas-push-notifications-e870bb54e14f"&gt;&lt;strong&gt;Everything You Need to Know About PWAs — Push Notifications&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://uxcam.com/blog/push-notification-guide/"&gt;&lt;strong&gt;Push Notification UX: The Full Guide 2022 (Updated)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.smashingmagazine.com/2020/12/progressive-web-apps/#the-application-works-offline-as-it-does-online"&gt;&lt;strong&gt;How To Optimize Progressive Web Apps: Going Beyond The Basics - Smashing Magazine&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or this series, and I appreciate any feedback to improve My content.&lt;/p&gt;

&lt;p&gt;Find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>Javascript 1O1 series: Array’s Methods And Iterators Part(1), Methods.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Sun, 24 Apr 2022 20:19:25 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-1o1-series-arrays-methods-and-iterators-part1-methods-24ff</link>
      <guid>https://dev.to/osam1010/javascript-1o1-series-arrays-methods-and-iterators-part1-methods-24ff</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eTgFLKvW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv9xhesujkhwq4issjtt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eTgFLKvW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vv9xhesujkhwq4issjtt.png" alt="javascript" width="880" height="366"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  You'll learn:
&lt;/h2&gt;

&lt;p&gt;Some useful array methods to make dealing with arrays is an easy thing, I hope you won't find any issues with handling arrays operations from now on.&lt;/p&gt;




&lt;h2&gt;
  
  
  Insert and Remove:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;shift:&lt;/strong&gt;&lt;br&gt;
shift() is used to remove the first element of the array.&lt;br&gt;
&lt;code&gt;Array.shift()&lt;/code&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jRCpBwj---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3h93sms9o9akw62ruyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jRCpBwj---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u3h93sms9o9akw62ruyg.png" alt="shift" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;unshift:&lt;/strong&gt;&lt;br&gt;
unshift is used to insert an element into the array, unshift will add the element to the start of the array&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MLp3xS9I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75sz55bilvgyd1epdcap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MLp3xS9I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/75sz55bilvgyd1epdcap.png" alt="unshift" width="614" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;push:&lt;/strong&gt;&lt;br&gt;
push is used to append elements to the array, (add to the end)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8W7FMGkW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd3zqbncb2kn1id2decf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8W7FMGkW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nd3zqbncb2kn1id2decf.png" alt="push" width="532" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;pop:&lt;/strong&gt;&lt;br&gt;
pop is used to pop out (remove) the last element of the array&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w5o9npsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0z4i01g3w20l98weta7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w5o9npsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0z4i01g3w20l98weta7.png" alt="pop" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Sub-arrays:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;slice:&lt;/strong&gt;&lt;br&gt;
slice is used to copy elements in a specific range.&lt;br&gt;
e.g.you have an array and you want to get the elements between index 1 and index 3&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8dU6GoSp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xyuey0bo35gn0iwghjt8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8dU6GoSp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xyuey0bo35gn0iwghjt8.png" alt="slice" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;when the end parameter is not defined, then the slice extends to the end of the array&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let slicedArr2 = arr.slice(1)&lt;br&gt;
// [2,3,4,5,6,7,8,9]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;spliced:&lt;/strong&gt;&lt;br&gt;
slice is used to REMOVE elements from an array.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---M5_u6pi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc2mzqdvy7lkyemev0ir.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---M5_u6pi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc2mzqdvy7lkyemev0ir.png" alt="spliced" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KCHxERNw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8go88oky9pffwlql7bxv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KCHxERNw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8go88oky9pffwlql7bxv.png" alt="slice and splice meme" width="500" height="557"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Reordering:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;reverse:&lt;/strong&gt;&lt;br&gt;
used to reverse the array's elements.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EJ7VZnAQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/med3l3kimrvk4jc17g4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EJ7VZnAQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/med3l3kimrvk4jc17g4z.png" alt="reverse" width="768" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;By default, the sort() function sorts values as strings.&lt;br&gt;
This works well for strings ("Apple" comes before "Banana").&lt;br&gt;
However, if numbers are sorted as strings, "25" is bigger than "100", because "2" is bigger than "1".&lt;br&gt;
Because of this, the sort() method will produce incorrect result when sorting numbers.&lt;br&gt;
You can fix this by providing a compare function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9s_jDqKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfd79b169zewkf1aozfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9s_jDqKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfd79b169zewkf1aozfc.png" alt="sort" width="813" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so without compare function, sort() is not that useful.&lt;br&gt;
more about sort: &lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" rel="noopener noreferrer" class="c-link"&gt;
          Array.prototype.sort() - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The sort() method sorts the elements of an array in place and
  returns the sorted array. The default sort order is ascending, built upon converting the
  elements into strings, then comparing their sequences of UTF-16 code units values.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  Search and Sort:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;includes:&lt;/strong&gt;&lt;br&gt;
used to check if an element does exist or not.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sjpB8MqN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/roes1oej4483ntinjt9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sjpB8MqN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/roes1oej4483ntinjt9p.png" alt="includes" width="679" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;at:&lt;/strong&gt;&lt;br&gt;
simple, you pass an index and you get the value in that index.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AvSV8Ao1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kpaua2temyr2v1qqeeb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AvSV8Ao1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1kpaua2temyr2v1qqeeb.png" alt="at" width="758" height="230"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;indexOf:&lt;/strong&gt;&lt;br&gt;
indexOf() is the opposite of at(), you pass a value and get the value's index in the array.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WvEWpj4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90lz35bekrfkj4pjlkyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WvEWpj4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/90lz35bekrfkj4pjlkyv.png" alt="indexOf" width="734" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;sort:&lt;/strong&gt;&lt;br&gt;
sort can be used here as well&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;By default, the sort() function sorts values as strings.&lt;br&gt;
This works well for strings ("Apple" comes before "Banana").&lt;br&gt;
However, if numbers are sorted as strings, "25" is bigger than "100", because "2" is bigger than "1".&lt;br&gt;
Because of this, the sort() method will produce incorrect result when sorting numbers.&lt;br&gt;
You can fix this by providing a compare function.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9s_jDqKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfd79b169zewkf1aozfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9s_jDqKc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfd79b169zewkf1aozfc.png" alt="sort" width="813" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so without compare function, sort() is not that useful.&lt;br&gt;
more about sort: &lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" rel="noopener noreferrer" class="c-link"&gt;
          Array.prototype.sort() - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The sort() method sorts the elements of an array in place and
  returns the sorted array. The default sort order is ascending, built upon converting the
  elements into strings, then comparing their sequences of UTF-16 code units values.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  Adding and combining arrays :
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;concat:&lt;/strong&gt;&lt;br&gt;
used to combine (add together) two or more arrays, non of the combined arrays will be modified, concat() will return a new array instead.&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WSoJEz5W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i0hr22nkeojwpu6ki3v7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WSoJEz5W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i0hr22nkeojwpu6ki3v7.png" alt="concat" width="800" height="274"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Array to String conversion:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;toString:&lt;/strong&gt;&lt;br&gt;
used to represent an array in string format.&lt;/p&gt;

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

&lt;p&gt;there is also toLocalString(), search about it as an exercise and learn the difference between toString() and toLocalString(), if you know, please share the answer in a comment.&lt;/p&gt;


&lt;h2&gt;
  
  
  Other methods:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;flat:&lt;/strong&gt;&lt;br&gt;
when you have a nested arrays and want to pull out all these nested arrays to a new array, flat() is used.&lt;br&gt;
flat() doesn't modify the array, it returns a new array instead.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vdbfkU_c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hz4mx72pz8h6sjl6ytuj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vdbfkU_c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hz4mx72pz8h6sjl6ytuj.png" alt="flat" width="778" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fill:&lt;/strong&gt;&lt;br&gt;
used to fill the whole or part of the array with a specific value. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--umI5LOlK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atj953ve9c3m3ylji6to.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--umI5LOlK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atj953ve9c3m3ylji6to.png" alt="fill" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  References:
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="javascript.plainenglish.io" rel="noopener noreferrer"&gt;
      javascript.plainenglish.io
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.oreilly.com/library/view/javascript-the-definitive/9781491952016/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--YrH27m7W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.oreilly.com/library/cover/9781491952016/" height="184" class="m-0" width="140"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.oreilly.com/library/view/javascript-the-definitive/9781491952016/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript: The Definitive Guide, 7th Edition [Book]
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
           JavaScript is the programming language of the web and is used by more software developers today than any other programming language. For nearly 25 years this best seller has been …  - Selection from JavaScript: The Definitive Guide, 7th Edition [Book]
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--lAXDMC0n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.oreilly.com/favicon.ico" width="48" height="48"&gt;
        oreilly.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="javascript.info" rel="noopener noreferrer"&gt;
      javascript.info
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" rel="noopener noreferrer" class="c-link"&gt;
          Array - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The Array object, as with arrays in other programming languages, enables storing a collection of multiple items under a single variable name, and has members for performing common array operations.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.geeksforgeeks.org/javascript-basic-array-methods/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--LPKFLZCi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png" height="200" class="m-0" width="200"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.geeksforgeeks.org/javascript-basic-array-methods/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript Basic Array Methods - GeeksforGeeks
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--7a9m63W_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_favicon.png" width="16" height="16"&gt;
        geeksforgeeks.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://livecodestream.dev/post/15-must-know-javascript-array-methods/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--dOG7Y15i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://livecodestream.dev/post/15-must-know-javascript-array-methods/featured.jpg" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://livecodestream.dev/post/15-must-know-javascript-array-methods/" rel="noopener noreferrer" class="c-link"&gt;
          15 Must-Know JavaScript Array Methods
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Master JavaScript arrays with these 15 methods and become a more productive JavaScript developer.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--pO8t48sS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://livecodestream.dev/images/favicon.ico" width="32" height="32"&gt;
        livecodestream.dev
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or this series, and I appreciate any feedback to improve My content.&lt;/p&gt;

&lt;p&gt;Find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Javascript 1O1 series: Scopes and Execution Contexts.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Thu, 21 Apr 2022 21:15:18 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-1o1-series-scopes-and-execution-contexts-gki</link>
      <guid>https://dev.to/osam1010/javascript-1o1-series-scopes-and-execution-contexts-gki</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kg5clqZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5zpw75irokkwqb031et.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kg5clqZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w5zpw75irokkwqb031et.png" alt="Image description" width="600" height="600"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  You'll learn:
&lt;/h2&gt;

&lt;p&gt;About the three levels of scope in javascript, block scope, function scope, and global scope and execution contexts and how javascript code is executed.&lt;/p&gt;




&lt;h2&gt;
  
  
  What scope is in javascript:
&lt;/h2&gt;

&lt;p&gt;The scope is deciding the visibility or the availability of the variables and expressions through the program, a variable defined inside that scope is only accessible within that scope, and inaccessible out of it&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The current context of execution. The context in which values and expressions are "visible" or can be referenced. MDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;in simple words, the scope is where your variables and expressions are accessible and where they are not.&lt;br&gt;
And it has three levels which are block scope, function level, and global level, each of which has its own execution context.&lt;/p&gt;
&lt;h2&gt;
  
  
  Execution Context:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E6yZTjjw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzdrl5ylxh14em54rpo6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E6yZTjjw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzdrl5ylxh14em54rpo6.png" alt="from freeCodeCamp" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The Execution Context contains the code that's currently running, and everything that aids in its execution. During the Execution Context run-time, the specific code gets parsed by a parser, the variables and functions are stored in memory, executable byte-code gets generated, and the code gets executed. freeCodeCamp&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;in simple words, think of the javascript engine as a human, this human has a lot of things to do, the most appropriate way to get things done is by grouping related things together then finish it and move on to the next group. and think of execution contexts as a group of related things that need to be done&lt;/p&gt;

&lt;p&gt;javascript engine before starting executing the code, it defines the execution contexts and then executes any context in isolation from other contexts inside the global context.&lt;/p&gt;
&lt;h2&gt;
  
  
  Global Execution Context (GEC):
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Whenever the JavaScript engine receives a script file, it first creates a default Execution Context known as the Global Execution Context (GEC).&lt;br&gt;
The GEC is the base/default Execution Context where all JavaScript code that is not inside of a function gets executed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Function Execution Context (FEC):
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Whenever a function is called, the JavaScript engine creates a different type of Execution Context known as a Function Execution Context (FEC) within the GEC to evaluate and execute the code within that function.&lt;br&gt;
Since every function call gets its own FEC, there can be more than one FEC in the run-time of a script.&lt;/p&gt;
&lt;/blockquote&gt;

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


&lt;h2&gt;
  
  
  Block scope (started from ES6):
&lt;/h2&gt;

&lt;p&gt;variables defined with const and let keywords inside of block scope, are only usable inside that block, only variables defined with var can be accessed from outside that block&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mt-z_MpS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/raqdgw63lthfbcmruuzt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mt-z_MpS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/raqdgw63lthfbcmruuzt.png" alt="Image description" width="623" height="278"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Function scope:
&lt;/h2&gt;

&lt;p&gt;any variable defined within function scope (defined inside of function body) is only accessible for that function and can not be accessed from outside in any condition.&lt;br&gt;
The variables that you declare inside a function are local to the function&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BsOHsknl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lgumrtdlizwerxapvuw5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BsOHsknl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lgumrtdlizwerxapvuw5.png" alt="Image description" width="618" height="227"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Global scope:
&lt;/h2&gt;

&lt;p&gt;if a variable is not defined within any scope, it makes that variable's scope Global&lt;br&gt;
which means that the variable is accessible from any inner scope&lt;br&gt;
global scope the global scope is the outermost scope level, any variable defined within this scope is accessible from any other inner scopes (Block scope or Function scope).&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aqfUC2j2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anu255ktfzyih240s6c2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aqfUC2j2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anu255ktfzyih240s6c2.png" alt="Image description" width="672" height="481"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Block vs Function vs Global:
&lt;/h2&gt;

&lt;p&gt;you'll often be defining variables within the function scope or block scope, Do not define global scope variable unless you need it, Why? variables defined in the global scope are available everywhere in your code, that makes it easy to overwrite and makes the testing task painful.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Some other issues with globals:&lt;br&gt;
They are slower to access in Javascript than locals because they are the last ones found as the interpreter looks for a given variable name in the various scopes that it might exist in. Usually not a noticeable problem, but something to be aware of. Here's a jsperf that shows how much of a difference there can be.&lt;br&gt;
If you have any asynchronous code that modifies globals or timer-driven code that modifies globals and more than one asynchronous operation can be in flight at the same time, the multiple async operations can step on each other through the modification of the same globals.&lt;/p&gt;

&lt;p&gt;Globals are often not declared near the point of use so reading code can be more challenging.&lt;/p&gt;

&lt;p&gt;Globals are generally not shown automatically in the debugger (the way local variables are) making debugging a little less convenient.&lt;/p&gt;

&lt;p&gt;IE automatically defines a bunch of global variables based on some names in the DOM which can conflict with your own global variables without you realizing it.&lt;/p&gt;

&lt;p&gt;A simple omission of the keyword "var" on a local variable makes it a global variable and can confuse the heck out of code if that name is already being used as an intended global variable. I've seen this happen on the for (i = 0; i &amp;lt; m.length; i++) construct before. It can be tough to track down what is wrong.&lt;/p&gt;

&lt;p&gt;Global variables persist for the life of the script. If one is using a global variable to hold an object reference for something that doesn't need to exist for the life of the script, this can cause the script to use more memory than it otherwise would.&lt;/p&gt;

&lt;p&gt;Global variables in a browser exist in the scope of the window object so they can conflict not only with other globals, but also anything else on the window object. Stackoverflow&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  References and useful links :
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.freecodecamp.org/news/execution-context-how-javascript-works-behind-the-scenes/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--n2LBxDz9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.freecodecamp.org/news/content/images/2022/02/header.png" height="464" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.freecodecamp.org/news/execution-context-how-javascript-works-behind-the-scenes/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript Execution Context – How JS Works Behind The Scenes
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          All JavaScript code needs to be hosted and run in some kind of environment. In most cases, that environment would be a web browser.  For any piece of JavaScript code to be executed in a web browser, a lot of processes take place behind the scenes. In this article,
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--hIx-kc5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.freecodecamp.org/universal/favicons/favicon.ico" width="48" height="48"&gt;
        freecodecamp.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Scope" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Scope" rel="noopener noreferrer" class="c-link"&gt;
          Scope - MDN Web Docs Glossary: Definitions of Web-related terms | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The current context of execution. The context in which values and expressions are "visible" or can be referenced. If a variable or other expression is not "in the current scope," then it is unavailable for use. Scopes can also be layered in a hierarchy, so that child scopes have access to parent scopes, but not vice versa.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://dmitripavlutin.com/javascript-scope/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--0vz9BhD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dmitripavlutin.com/static/0e8cc3fa4620de81448ac019ae55208b/c24d5/javascript-scope-cover-2.png" height="393" class="m-0" width="708"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://dmitripavlutin.com/javascript-scope/" rel="noopener noreferrer" class="c-link"&gt;
          A Simple Explanation of Scope in JavaScript
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The scope is an important concent that manages variables accessibility. I will explain step by step, in-depth, what the scope is in JavaScript.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--FajccYN4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dmitripavlutin.com/favicon.ico" width="32" height="32"&gt;
        dmitripavlutin.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.javascripttutorial.net/javascript-variable-scope/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--qgBnUMPn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.javascripttutorial.net/wp-content/uploads/2019/12/JavaScript-Global-Variables.png" height="232" class="m-0" width="556"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.javascripttutorial.net/javascript-variable-scope/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript Variable Scopes
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          In this tutorial, you will learn about the JavaScript variable scope that determines the visibility and accessibility of variables.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--RoJGIPyG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.javascripttutorial.net/wp-content/uploads/2020/02/favicon-150x150.png" width="150" height="150"&gt;
        javascripttutorial.net
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, feel free to ask any question about javascript or about this series, I appreciate any feedback or advises to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Javascript 1O1 series : Functions</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Tue, 19 Apr 2022 06:13:09 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-1o1-series-functions-4g9c</link>
      <guid>https://dev.to/osam1010/javascript-1o1-series-functions-4g9c</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oQxqvpgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aouc8i5ehgy5fdvhzhh6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oQxqvpgv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aouc8i5ehgy5fdvhzhh6.png" alt="tutorials tonight" width="754" height="351"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  You’ll learn :
&lt;/h2&gt;

&lt;p&gt;How to declare and define functions, Passing arguments and parameters as well as return values at the end of the function, as well as using anonymous functions.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What is function :&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A JavaScript function is a block of code designed to perform a particular task.&lt;br&gt;
A JavaScript function is executed when “something” invokes it (calls it). w3schools.&lt;br&gt;
Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure — a set of statements that performs a task or calculates a value. MDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Functions are simply block of code that wrote once, but can be used many times.&lt;br&gt;
Syntax :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function name (parameters) {&lt;br&gt;
functions logic here ;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;function keyword, identifier as name for the function, parentheses so it can hold parameters or not, and then curly brackets that will hold the code inside.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why we need to use functions :&lt;/strong&gt;&lt;br&gt;
when we write javascript code, any statement or expressions will be executed only once unless it’s inside a loop or under conditionals statements, and if we need to use particular statements, we’ll have to write all again and again whenever we need that statements.&lt;/p&gt;

&lt;p&gt;when using function we simply put some code or statements inside of a block and give it unique name, and then we can reuse that code block whenever we want by just calling it’s name.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bnPRPqb3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vui1yv0wlye4enaucy7b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bnPRPqb3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vui1yv0wlye4enaucy7b.png" alt="without functions" width="569" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as you see, it's very hard and painful and not even makes sense if we code like this, so let's see how it turns we use functions.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QPbJRCM8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/650fs91nuho6vo0mjqcx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QPbJRCM8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/650fs91nuho6vo0mjqcx.png" alt="with functions" width="673" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parameters and arguments :&lt;/strong&gt;&lt;br&gt;
every function do specific task, these task may need some data from outside to get things done.&lt;br&gt;
if our function needs some data which is lay out of it, how can we pass the needed data to it ?&lt;br&gt;
i introduce parameters for you&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0bUmPPzF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0atqrpdd7zhr0qkwuy2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0bUmPPzF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0atqrpdd7zhr0qkwuy2.png" alt="parameters" width="711" height="191"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;parameters are simply variables to store data coming from outside of the function and make it available to the function to make use of it.&lt;/p&gt;

&lt;p&gt;imagine someone want to give you something, what would you do ?, often you’ll open your hands to take it from that person, as well as function has parameter to store the data has been send to it for using it to perform some operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Parameter Rules&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JavaScript function definitions do not specify data types for parameters.&lt;br&gt;
JavaScript functions do not perform type checking on the passed arguments.&lt;br&gt;
JavaScript functions do not check the number of arguments received. w3schools&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;How to declare Parameters :&lt;/strong&gt;&lt;br&gt;
the good thing is parameters variables doesn’t need to be declared in explicit way as other variables like var, let or const, you just name the needed parameters and they will be variable that available inside the function body.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s9yy9Pd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tc7piy1qptjaegjsy84q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s9yy9Pd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tc7piy1qptjaegjsy84q.png" alt="Image description" width="581" height="203"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;What is arguments :&lt;/strong&gt;&lt;br&gt;
The function’s variables that we declared to receive data for the function we call it parameters, and these passed parameters values are called arguments.&lt;br&gt;
so the function variable that used to hold data from outside is parameter, and the passed value to that function from outside is argument, ok ?&lt;br&gt;
more about parameters and argument :&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.geeksforgeeks.org/javascript-function-parameters/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--LPKFLZCi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png" height="200" class="m-0" width="200"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.geeksforgeeks.org/javascript-function-parameters/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript | Function Parameters - GeeksforGeeks
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--7a9m63W_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_favicon.png" width="16" height="16"&gt;
        geeksforgeeks.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="w3schools.com" rel="noopener noreferrer"&gt;
      w3schools.com
    &lt;/a&gt;
&lt;/div&gt;





&lt;p&gt;&lt;strong&gt;Function Expressions :&lt;/strong&gt;&lt;br&gt;
A JavaScript function can also be defined using an expression.&lt;br&gt;
A function expression can be stored in a variable:&lt;/p&gt;

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

&lt;p&gt;more about function expression:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function" rel="noopener noreferrer" class="c-link"&gt;
          Function expression - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          The function keyword can be used to define a function inside an expression.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;&lt;strong&gt;Anonymous function :&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;is a function that does not have any name associated with it. Normally we use the function keyword before the function name to define a function in JavaScript, however, in anonymous functions in JavaScript, we use only the function keyword without the function name. geeks for geeks&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Functions stored in variables do not need function names. They are always invoked (called) using the variable name.&lt;br&gt;
also you can use anonymous function with the new syntax, arrow functions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Arrow functions :&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OvusPbCA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuzka7m0h9u5hvz27xtz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OvusPbCA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuzka7m0h9u5hvz27xtz.png" alt="arrow" width="488" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;An arrow function expression is a compact alternative to a traditional function expression, but is limited and can’t be used in all situations.&lt;/li&gt;
&lt;li&gt;There are differences between arrow functions and traditional functions, as well as some limitations:&lt;/li&gt;
&lt;li&gt;Arrow functions don’t have their own bindings to this or super, and should not be used as methods.&lt;/li&gt;
&lt;li&gt;Arrow functions don’t have access to the new.target keyword.&lt;/li&gt;
&lt;li&gt;Arrow functions aren’t suitable for call, apply and bind methods, which generally rely on establishing a scope.&lt;/li&gt;
&lt;li&gt;Arrow functions cannot be used as constructors.&lt;/li&gt;
&lt;li&gt;Arrow functions cannot use yield, within its body. MDN
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YSSnrXko--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/koape10p87x3clbjkpg9.png" alt="arrow" width="880" height="240"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  What is return statement ?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Description : When a return statement is used in a function body, the execution of the function is stopped. If specified, a given value is returned to the function caller. MDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to reuse some code or some logic we wrap it in a function, but what if we also to reuse this function output ? like using its value inside a loop or use it in conditional statements or pass it to another functions or whatever else&lt;br&gt;
then you need to use RETURN&lt;/p&gt;

&lt;p&gt;what return do is simply evaluate some value and put it as the function value.&lt;/p&gt;

&lt;p&gt;if we returned 5 in a function, we can say the function’s value is 5, it's not exactly this way just assume it's like this to understand how to use return, also return stop executing the function, thus any code that after return will never be executed.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--64E961gf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvpf3dhxj1p7bm6o83yn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--64E961gf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvpf3dhxj1p7bm6o83yn.png" alt="return statement" width="657" height="235"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  References and useful links :
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="google.com" rel="noopener noreferrer"&gt;
      google.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.javascripttutorial.net/javascript-function/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--CJ1HJq7V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.javascripttutorial.net/wp-content/themes/evolution/img/left.svg" height="16" class="m-0" width="16"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.javascripttutorial.net/javascript-function/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript Functions
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          This tutorial introduces you to JavaScript functions that structure your code into smaller reusable units.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--RoJGIPyG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.javascripttutorial.net/wp-content/uploads/2020/02/favicon-150x150.png" width="150" height="150"&gt;
        javascripttutorial.net
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="programiz.com" rel="noopener noreferrer"&gt;
      programiz.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/xUI5Tsl2JpY"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/N8ap4k_1QEQ"&gt;
&lt;/iframe&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions" rel="noopener noreferrer" class="c-link"&gt;
          Functions - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, feel free to ask any question about javascript or about this series, I appreciate any feedback or advises to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Javascript 1O1 series : Variables vs Constants, and Let keyword.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Mon, 18 Apr 2022 10:38:17 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-1o1-series-variables-vs-constants-and-let-keyword-m0p</link>
      <guid>https://dev.to/osam1010/javascript-1o1-series-variables-vs-constants-and-let-keyword-m0p</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cSkJl0ut--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68erogewukyr72bfdqcn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cSkJl0ut--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68erogewukyr72bfdqcn.png" alt="speedy sense" width="830" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You’ll learn :&lt;/strong&gt;&lt;br&gt;
about constant and const keyword and variables declared with let keyword and the differences between these types of variables.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;constant :&lt;/strong&gt;&lt;br&gt;
we all know about variable and it is container that hold specific value during program’s execution, and this value can be changed whenever to whatever the programmer want.&lt;br&gt;
constants are the same thing but the only difference is the const value can not be changed during the code execution, the initiated value when we declare the constant will remain the same the whole time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Constants are block-scoped, much like variables declared using the let keyword. The value of a constant can't be changed through reassignment (i.e. by using the assignment operator), and it can't be redeclared (i.e. through a variable declaration). However, if a constant is an object or array its properties or items can be updated or removed. MDN.&lt;/p&gt;

&lt;p&gt;The const keyword was introduced in ES6 (2015), Variables defined with const cannot be Redeclared, Variables defined with const cannot be Reassigned. w3Schools.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;&lt;code&gt;const identifier = anyValue;&lt;br&gt;
const x = 10 ;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;const keyword , identifier, assignment operator, any value&lt;br&gt;
variable declared by const keyword, its value can not be changed (object’s properties and array’s elements still can be updated or removed), it can not be redeclared, and last thing its scope will be Blocked-Scope.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2sdsd-1P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5544t1rrc1w30ktyy4r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2sdsd-1P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f5544t1rrc1w30ktyy4r.png" alt="Image description" width="448" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you’ll learn about scopes in later tutorial&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Let keyword :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The let statement declares a block-scoped local variable, optionally initializing it to a value. MDN&lt;br&gt;
variables declared with let keyword and variables declared with var do the same thing , they are variables and its rules pretty much the same, the key difference is their scope limitation, var is function-scope and let is blocked scope.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---89mFkne--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq0srh9arwacvo0uo4h3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---89mFkne--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oq0srh9arwacvo0uo4h3.png" alt="Image description" width="347" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if you want to read and understand what scope is.&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="w3schools.com" rel="noopener noreferrer"&gt;
      w3schools.com
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Rules for let variables :&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The let keyword was introduced in ES6 (2015).&lt;/li&gt;
&lt;li&gt;Variables defined with let cannot be Redeclared.&lt;/li&gt;
&lt;li&gt;Variables defined with let must be Declared before use.&lt;/li&gt;
&lt;li&gt;Variables defined with let have Block Scope. w3schools&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Syntax :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let identifier = anyValue;&lt;br&gt;
let x ;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;let keyword, identifier, assignment operator and a given value.&lt;br&gt;
you can drop the initiated value when declaring let variables and can assign it later, the default value will be undefined when no value assigned to the let variable. expression.&lt;/p&gt;
&lt;h2&gt;
  
  
  Let vs Var vs Const :
&lt;/h2&gt;

&lt;p&gt;let and var variables can be reassigned, const can’t&lt;br&gt;
var variables can be redeclared, let and const can’t&lt;br&gt;
let and const are blocked-scope, while var is a function-scope&lt;br&gt;
let and var can be declared without initial value, const can’t&lt;br&gt;
let and var default values without initialization values will be undefined&lt;/p&gt;

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


&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/swlh/the-difference-of-var-vs-let-vs-const-in-javascript-abe37e214d66" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qETR_M2_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2AF4ANWTAJiVLeGGl-VdKapg.jpeg" alt="Megan Lo"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/swlh/the-difference-of-var-vs-let-vs-const-in-javascript-abe37e214d66" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The Difference of “var” vs “let” vs “const” in Javascript | by Megan Lo | The Startup | Medium&lt;/h2&gt;
      &lt;h3&gt;Megan Lo ・ &lt;time&gt;Oct 26, 2020&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;h2&gt;
  
  
  References and useful links :
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--LKFvZIkf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-media-2.freecodecamp.org/w1280/5f9c9bd4740569d1a4ca2e24.jpg" height="574" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/" rel="noopener noreferrer" class="c-link"&gt;
          Var, Let, and Const – What's the Difference?
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          A lot of shiny new features came out with ES2015 (ES6). And now, since it's 2020, it's assumed that a lot of JavaScript developers have become familiar with and have started using these features.  While this assumption might be partially true, it's still possible that some of these features
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--hIx-kc5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.freecodecamp.org/universal/favicons/favicon.ico" width="48" height="48"&gt;
        freecodecamp.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.geeksforgeeks.org/difference-between-var-let-and-const-keywords-in-javascript/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--LPKFLZCi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200x200-min.png" height="200" class="m-0" width="200"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.geeksforgeeks.org/difference-between-var-let-and-const-keywords-in-javascript/" rel="noopener noreferrer" class="c-link"&gt;
          Difference between var, let and const keywords in JavaScript - GeeksforGeeks
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--7a9m63W_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_favicon.png" width="16" height="16"&gt;
        geeksforgeeks.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/swlh/the-difference-of-var-vs-let-vs-const-in-javascript-abe37e214d66" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qETR_M2_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2AF4ANWTAJiVLeGGl-VdKapg.jpeg" alt="Megan Lo"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/swlh/the-difference-of-var-vs-let-vs-const-in-javascript-abe37e214d66" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The Difference of “var” vs “let” vs “const” in Javascript | by Megan Lo | The Startup | Medium&lt;/h2&gt;
      &lt;h3&gt;Megan Lo ・ &lt;time&gt;Oct 26, 2020&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, feel free to ask any question about javascript or about this series, I appreciate any feedback or advises to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Javascript 1O1 series : Writing loops with For, While and Do while.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Sun, 17 Apr 2022 05:00:07 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-1o1-series-writing-loops-with-for-while-and-do-while-1ib3</link>
      <guid>https://dev.to/osam1010/javascript-1o1-series-writing-loops-with-for-while-and-do-while-1ib3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tJFp2_4w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9is0lwrwyhqod3vgmc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tJFp2_4w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9is0lwrwyhqod3vgmc7.png" alt="from tutorialandexample.com" width="400" height="450"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;You’ll learn :&lt;/strong&gt;&lt;br&gt;
About loops statements and their usage, and how to chose the right loop for your code situation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what are loops :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;its a way to execute a certain code repeatedly based on some condition&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Loops offer a quick and easy way to do something repeatedly. MDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;we have 3 types of loops in javascript, each of which has its own syntax, use cases, thought all of them do the same thing :execute certain code over and over.&lt;/p&gt;

&lt;p&gt;for : loops through a block of code a number of times&lt;br&gt;
while : loops through a block of code while a specified condition is true&lt;br&gt;
do … while : also loops through a block of code while a specified condition is true&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;For:&lt;/strong&gt;&lt;br&gt;
its Syntax :&lt;/p&gt;

&lt;p&gt;for (counter ; condition ; update the counter after every code execution) {&lt;br&gt;
the code we’ll execute over and over;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;condition is to decide when to stop the loop or to repeat it once again, most likely it’ll be a comparison between two values and if this condition is true, the loop will keep working.&lt;br&gt;
for be like, hey repeat this code until the condition is met or happen&lt;br&gt;
e.g.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2h6ziQLw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmnfjl3phcls86mkydcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2h6ziQLw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cmnfjl3phcls86mkydcd.png" alt="for" width="493" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;guess what ? this simple code will print 5 different values! how is that ?&lt;/p&gt;

&lt;p&gt;how it works and the steps our code will go through :&lt;br&gt;
first define the counter be 0, and as long as counter value is less than 5, print its value and repeat.&lt;br&gt;
and if the counter value is not less than 5, then stop&lt;br&gt;
lets see the steps it goes to execute this code&lt;br&gt;
1/ initiate a counter&lt;br&gt;
2/ set the condition that allow the code to keep executing&lt;br&gt;
3/ execute the code block&lt;br&gt;
4/ update the counter after each execution&lt;/p&gt;

&lt;p&gt;e.g.&lt;br&gt;
Print the summation of numbers between 0 and 10 :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gLsTVu7P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zblxpxptw992ah9tsipf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gLsTVu7P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zblxpxptw992ah9tsipf.png" alt="for loop" width="605" height="212"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;while :&lt;/strong&gt;&lt;br&gt;
The while statement is a more simple version of the for statement which checks if an expression evaluates to true and runs as long as it says true.&lt;br&gt;
Syntax :&lt;/p&gt;

&lt;p&gt;while (condition is true) {&lt;br&gt;
execute this code;&lt;br&gt;
}&lt;br&gt;
its like you say, while this condition is true, keep the loop working.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kpKtehXO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ktusx0sp1s2utg10yvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kpKtehXO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ktusx0sp1s2utg10yvc.png" alt="while" width="418" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eapIlWuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgb7krtzxc068so5w4vf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eapIlWuU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qgb7krtzxc068so5w4vf.png" alt="while loop" width="482" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the condition becomes false, code within the loop will stop executing.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Do while :&lt;/strong&gt;&lt;br&gt;
syntax :&lt;br&gt;
do {&lt;br&gt;
our code block we want to execute when the condition is tru&lt;br&gt;
} while (the condition)&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fXpW6O7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a76m8o1mwnez91sgjxrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fXpW6O7S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a76m8o1mwnez91sgjxrj.png" alt="do while" width="499" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Do-while loops are useful when you want your code to output some sort of menu to a screen so that the menu is guaranteed to show once.&lt;/p&gt;

&lt;p&gt;simply you say, repeat executing the code while the condition is true.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Differences between while and do…while :&lt;/strong&gt;&lt;br&gt;
in while statement, the condition will be checked first and if it true the code block will be executed.&lt;br&gt;
but when it comes to do while, it execute the code block first and then check the condition whether it is true or not.&lt;br&gt;
it means if our condition is false, in while statement the code block will not be executed, but in do while it will be executed only one.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;References and useful Links :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="w3schools.com" rel="noopener noreferrer"&gt;
      w3schools.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/@osama1010/conditional-statements-and-loops-practices-in-javascript-6ac2f6869e16" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ho1MNvXI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2A79c7h868ffFC3hM0vszVkA.jpeg" alt="Osama"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/@osama1010/conditional-statements-and-loops-practices-in-javascript-6ac2f6869e16" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Conditional statements and loops Practices in Javascript. | by Osama | Apr, 2022 | Medium&lt;/h2&gt;
      &lt;h3&gt;Osama ・ &lt;time&gt;Apr 15, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OAsU75iZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/mdn-social-share.cd6c4a5a.png" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration" rel="noopener noreferrer" class="c-link"&gt;
          Loops and iteration - JavaScript | MDN
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Loops offer a quick and easy way to do something repeatedly. This
  chapter of the JavaScript Guide
  introduces the different iteration statements available to JavaScript.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--EbU_GRSf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://developer.mozilla.org/favicon-48x48.cbbd161b.png" width="48" height="48"&gt;
        developer.mozilla.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.freecodecamp.org/news/javascript-loops-explained-for-loop-for/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--XaVyhc1K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-media-2.freecodecamp.org/w1280/5f9c9c92740569d1a4ca32f7.jpg" height="660" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.freecodecamp.org/news/javascript-loops-explained-for-loop-for/" rel="noopener noreferrer" class="c-link"&gt;
          JavaScript Loops Explained: For Loop, While Loop, Do...while Loop, and More
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Loops are used in JavaScript to perform repeated tasks based on a condition. Conditions typically return true or false. A loop will continue running until the defined condition returns false. for Loop Syntax for (initialization; condition; finalExpression) {   // code } The for loop consists of three optional
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--hIx-kc5q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.freecodecamp.org/universal/favicons/favicon.ico" width="48" height="48"&gt;
        freecodecamp.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, feel free to ask any question about javascript or about this series, I appreciate any feedback or advises to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Great collection of Free resources to learn javascript and web development.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Fri, 15 Apr 2022 12:15:27 +0000</pubDate>
      <link>https://dev.to/osam1010/great-collection-of-free-resources-to-learn-javascript-and-web-development-1cmb</link>
      <guid>https://dev.to/osam1010/great-collection-of-free-resources-to-learn-javascript-and-web-development-1cmb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N5rqhHLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oi8k3lbxlu9qpfmgu5ct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N5rqhHLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oi8k3lbxlu9qpfmgu5ct.png" alt="from [unsplash](https://www.google.com/url?sa=i&amp;amp;url=https%3A%2F%2Funsplash.com%2Fs%2Fphotos%2Ffree-library&amp;amp;psig=AOvVaw1FdnOFHg8jBW8ZXwB4qUyr&amp;amp;ust=1650014759597000&amp;amp;source=images&amp;amp;cd=vfe&amp;amp;ved=0CA0QjhxqFwoTCKD18qm5k_cCFQAAAAAdAAAAABAI) " width="700" height="410"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;Why you’re here ?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
To learn about javascript and web development ?&lt;br&gt;
but you can’t find where-to-go article to help how to start your journey ?&lt;br&gt;
NO worries i got you here!&lt;br&gt;
in this article i’ll share with you a lot of valuable resources, starting from YouTube channels to interactive websites, to help you learn all things about javascript and web development ;).&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;YouTube channels :&lt;/strong&gt;&lt;br&gt;
who doesn’t know YouTube and use it every single day ?&lt;br&gt;
you can find great content and tutorials on youtube about everything in programming with full access to any video any time and most importantly, its ALL FREE FOREVER.&lt;br&gt;
actually most self-tought developer these days started their career from this platform (i started from here myself).&lt;br&gt;
Traversy media :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/user/TechGuyWeb" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M_JBBY0Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLSxHOOxxa9Af8Bfb2XMop3lm4tor9bViWiC-d5aaw%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/user/TechGuyWeb" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Traversy Media features the best online web development and programming tutorials for all of the latest web technologies from the building blocks of HTML, CSS &amp;amp; JavaScript to frontend frameworks like React and Vue to backend technologies like Node.js, Python and PHP
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;this channel is a treasure for every beginner on this field and it covers so much programming languages like html ,CSS , JS, python …etc and famous frameworks like React Node.js Express Angular ..etc so you can start with it.&lt;/p&gt;

&lt;p&gt;programming with mosh :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/user/programmingwithmosh" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--L2FoQ7_k--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/tBEPr-zTNXEeae7VZKSZYfiy6azzs9OHowq5ZvogJeHoVtKtEw2PXSwzMBKVR7W0MI7gyND8%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/user/programmingwithmosh" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          I train professional software engineers that companies love to hire. 

My courses: http://codewithmosh.com 

My blog: http://programmingwithmosh.com

Connect on social media: 

http://www.twitter.com/moshhamedani

https://www.facebook.com/programmingwithmosh

#python #javascript #chsarp
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
mosh hamedani the founder of this nice channel, he has lot of crash course and short videos with animations that make its channel very special

&lt;p&gt;Net ninja :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--uWuqPkb8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLT3v89U-2iVX-78hqPk1-lBIduTcljrKLIH9YJg1A%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Black-belt your web development skills. Over 1000 free programming tutorials about:

- Modern JavaScript (beginner to advanced)
- Node.js
- React
- Vue.js
- Firebase
- MongoDB
- HTML &amp;amp; CSS
- PHP &amp;amp; MySQL
- Laravel
- React Native
- Flutter

...And many more topics as well :)

        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;for me its on my top 10 resources when i need to learn new skill or library or framework and what i really like about this channel is its simplicity and clear explanation on the topics he covers (you’ll found here almost 1000 free videos about web development )&lt;/p&gt;

&lt;p&gt;Dev Ed:&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/c/DevEd/videos" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--0V0vSRwa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLSB-oR-xmvVSZXJ3gbK12uvv0AJUvajwxMie_R_uw%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/c/DevEd/videos" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Learn web development, web design, 3d modelling, tools like figma and more without getting bored!

The goes of this channel is to get you to become as creative you can be!

So if you like to create video games in Unity or develop an application in node.js, stick around and have fun!
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;my favourite YouTube channel to learn web dev , he covers videos on web development, web design, and 3D modelling&lt;br&gt;
also teaching you to use tools like figma and adobe XD.&lt;/p&gt;

&lt;p&gt;freeCodeCamp :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/c/Freecodecamp/videos" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--P37NGgzY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLRyPFojwY3CXV5ks5TwPrt2VifQn-nYNfkgLvVPkw%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/c/Freecodecamp/videos" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Learn to code for free.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;one of the best youtube channel for developer , they way of teaching is publish long and fully featured videos (sometimes one video is more than 10 hours ! really good for me )&lt;br&gt;
they also has thier own site where you can find more than 8,000 tutorials , not only videos but also articles&lt;br&gt;
pretty good right ?&lt;br&gt;
give’em a try, site.&lt;/p&gt;

&lt;p&gt;Clever Programmer:&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/c/CleverProgrammer/videos" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--OiWAlysJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLRbdv3Di8paQyrgMF_VwFXPkhwVzcW59Vgo8dTsyw%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/c/CleverProgrammer/videos" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          You can find awesome programming lessons here! Also, expect programming tips and tricks that will take your coding skills to the next level.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;want to learn web development by using what you’ve learned to build real-world projects ?&lt;br&gt;
here the the perfect channel for you&lt;br&gt;
Qazi and sonny are great , funny and creative youtubers with thier clever programmer where they release video on various topics and also building clones of popular websites like amazone , instagram and more&lt;br&gt;
you deffinatly need to check them&lt;/p&gt;

&lt;p&gt;Fireship :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/c/Fireship/vidoes" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Unpfpxlg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLR5CDv14gL4DQ7I4gxIlBMY6u-CNsq2qfeev48R2g%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/c/Fireship/vidoes" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          High-intensity ⚡ code tutorials to help you build &amp;amp; ship your app faster. Subscribe for new videos every week covering intermediate to advanced lessons about JavaScript, Flutter, Firebase, and modern app development.

The original home of #100SecondsOfCode and #CodeThisNotThat. Created by Jeff Delaney. 

Building an app? Get project support, advanced full courses, and more at https://fireship.io
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;a good channel contains hundreds of short videos that aims to teach you how to write code in the best way you can and it has alot of videos named ( 100 seconds on topic X ) the idea is to explain a topic in simple way within the 100 seconds , awesome right ?&lt;/p&gt;

&lt;p&gt;The new boston :&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.youtube.com/user/thenewboston/videos" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--tUeWev46--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLTXM_7Bq_VZhCw-7JOSJJDiCC14D39B3ajrldMVSA%3Ds900-c-k-c0x00ffffff-no-rj" height="880" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.youtube.com/user/thenewboston/videos" rel="noopener noreferrer" class="c-link"&gt;
          
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Tons of sweet computer related tutorials and some other awesome videos too!
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7WLWHDN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.youtube.com/s/desktop/4122e69b/img/favicon.ico" width="16" height="16"&gt;
        youtube.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
one of the oldest channels ever in web development and it covers wide range on programming languages and frameworks like python ,javascript , react angular Django etc also covers graphic editors like Photoshop, Adobe Illustrator, as well as other topics unrelated to development or design



&lt;p&gt;&lt;strong&gt;Books :&lt;/strong&gt;&lt;br&gt;
9 (FREE) JavaScript Books That Are Well Worth Reading&lt;br&gt;
Books are great, but books on subjects that evolve as fast as JavaScript can be a problem. While shiny and new one…&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="blog.bitsrc.io" rel="noopener noreferrer"&gt;
      blog.bitsrc.io
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;5 Free Books to learn JavaScript for Beginners&lt;br&gt;
The internet is full of good things, and one of them is free eBooks and PDF. Programmers can almost run anything by…&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/javarevisited/5-free-books-to-learn-javascript-for-beginners-4cca79834262" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QQcHdrGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://miro.medium.com/fit/c/96/96/0%2Au9Ha3uTCjEmW_3gn.gif" alt="javinpaul"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/javarevisited/5-free-books-to-learn-javascript-for-beginners-4cca79834262" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;5 Free Books to learn JavaScript for Beginners | by javinpaul | Javarevisited | Medium&lt;/h2&gt;
      &lt;h3&gt;javinpaul ・ &lt;time&gt;Oct 31, 2021&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Free JavaScript Books&lt;br&gt;
by Bradley Nice, Content Manager at ClickHelp.com — software documentation tool&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/level-up-web/free-javascript-books-8383ff79576a" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSlT5urc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2Ay-qasOnzXkeCiQeLfIrPoQ.jpeg" alt="Bradley Nice"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/level-up-web/free-javascript-books-8383ff79576a" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Free JavaScript Books. by Bradley Nice, Content Manager at… | by Bradley Nice | Level Up! | Medium&lt;/h2&gt;
      &lt;h3&gt;Bradley Nice ・ &lt;time&gt;Sep 28, 2018&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;28 Ebook And Course Free For Web Development&lt;br&gt;
For me, books or online courses can be considered as extremely useful resources in learning and... Tagged with html…&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/haycuoilennao19" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--chkabwch--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--2uo1ueNk--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/250777/c987ef7f-0e80-400b-bcf8-8aa12b770ef8.png" alt="haycuoilennao19"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/haycuoilennao19/28-ebook-and-course-free-for-web-development-89o" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;28 Ebook And Course Free For Web Development&lt;/h2&gt;
      &lt;h3&gt;Niemvuilaptrinh ・ Jan 25 '21 ・ 5 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#html&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#css&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;Top Free eBooks for Web Designers &amp;amp; Web Developers&lt;br&gt;
by Bradley Nice, Content Manager at ClickHelp.com — help authoring tool&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/web-development-zone/top-free-ebooks-for-web-designers-web-developers-f8c6a70465ad" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSlT5urc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/fit/c/96/96/1%2Ay-qasOnzXkeCiQeLfIrPoQ.jpeg" alt="Bradley Nice"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/web-development-zone/top-free-ebooks-for-web-designers-web-developers-f8c6a70465ad" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;Top Free eBooks for Web Designers &amp;amp; Web Developers | by Bradley Nice | Web Development Zone | Medium&lt;/h2&gt;
      &lt;h3&gt;Bradley Nice ・ &lt;time&gt;Sep 21, 2018&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;p&gt;&lt;strong&gt;Sites :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="w3schools.com" rel="noopener noreferrer"&gt;
      w3schools.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="javascript.info" rel="noopener noreferrer"&gt;
      javascript.info
    &lt;/a&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://stackify.com/learn-javascript-tutorials/#post-22661-_s3kfm94x6x64" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--0DbMlU4N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://stackify.com/wp-content/uploads/2018/10/JavaScript-Tutorials-for-Beginners.jpg" height="440" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://stackify.com/learn-javascript-tutorials/#post-22661-_s3kfm94x6x64" rel="noopener noreferrer" class="c-link"&gt;
          
            Learn JavaScript: Tutorials for Beginners, Intermediate and Advanced Programmers        Learn JavaScript: Tutorials for Beginners, Intermediate and Advanced Programmers
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          If you want to learn Javascript to pursue a career in development, then you are in the right place. Here are the best Javascript tutorials.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--0SuSl62_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://stackify.com/wp-content/uploads/2016/08/cropped-Green-Favicon-32x32.png" width="32" height="32"&gt;
        stackify.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="singlepageappbook.com" rel="noopener noreferrer"&gt;
      singlepageappbook.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
for more read &lt;a href="https://stackify.com/learn-javascript-tutorials/"&gt;&lt;strong&gt;&lt;em&gt;here&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;



&lt;p&gt;&lt;strong&gt;prefer reading articles and blogs ? no problems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/"&gt;Medium&lt;/a&gt; : where you read this articles now.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Medium is an open platform where readers find dynamic thinking, and where expert and undiscovered voices can share their writing on any topic. according to medium.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://dev.to/"&gt;Dev.to&lt;/a&gt; : is&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;DEV is a community of software developers getting together to help one another out. The software industry relies on collaboration and networked learning. according to Dev.to&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://www.freecodecamp.org/"&gt;FreeCodeCamp&lt;/a&gt; :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Our mission: to help people learn to code for free. We accomplish this by creating thousands of videos, articles, and interactive coding lessons — all free. — freecodecamp&lt;/p&gt;
&lt;/blockquote&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Other links may be useful :&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.fullstackacademy.com/blog/learn-javascript-for-free-13-online-tutorials-resources" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kgu1NiSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://fsa2-assets.imgix.net/assets/IMG_5919.jpg%3Fauto%3Dformat%26crop%3Dfocalpoint%26domain%3Dfsa2-assets.imgix.net%26fit%3Dcrop%26fp-x%3D0.5%26fp-y%3D0.5%26h%3D630%26ixlib%3Dphp-3.3.0%26q%3D82%26w%3D1200" height="462" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.fullstackacademy.com/blog/learn-javascript-for-free-13-online-tutorials-resources" rel="noopener noreferrer" class="c-link"&gt;
          13 Online Resources to Learn Javascript for Every Level
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Whether you’re a beginner coder or a professional developer, these free resources will help you level-up your JavaScript game.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--iwep95jb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.fullstackacademy.com/favicon-32x32.png" width="32" height="32"&gt;
        fullstackacademy.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="google.com" rel="noopener noreferrer"&gt;
      google.com
    &lt;/a&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="https://medium.com/javarevisited/my-favorite-free-tutorials-and-courses-to-learn-javascript-8f4d0a71faf2" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QQcHdrGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://miro.medium.com/fit/c/96/96/0%2Au9Ha3uTCjEmW_3gn.gif" alt="javinpaul"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://medium.com/javarevisited/my-favorite-free-tutorials-and-courses-to-learn-javascript-8f4d0a71faf2" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;10 Best Websites to Learn JavaScript Coding for FREE — Best of Lot | by javinpaul | Javarevisited | Medium&lt;/h2&gt;
      &lt;h3&gt;javinpaul ・ &lt;time&gt;Apr 15, 2022&lt;/time&gt; ・ 
      &lt;div class="ltag__link__servicename"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hnDHPsJs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/medium-f709f79cf29704f9f4c2a83f950b2964e95007a3e311b77f686915c71574fef2.svg" alt="Medium Logo"&gt;
        Medium
      &lt;/div&gt;
    &lt;/h3&gt;
&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.thebalancecareers.com/learn-javascript-online-2071405" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--fnx6Qffj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.thebalancecareers.com/thmb/SpTU0uLY7-yOGhzHARWJjaGieRU%3D/1500x1000/filters:fill%28auto%2C1%29/GettyImages-697539241-59b5b199c412440010200e47.jpg" height="587" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.thebalancecareers.com/learn-javascript-online-2071405" rel="noopener noreferrer" class="c-link"&gt;
          Places to Learn JavaScript Online
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Want to dip your toes into the world of JavaScript? To learn JavaScript, check out the free and paid options for training and certification online.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ECMy7jk---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.thebalancecareers.com/favicon.ico" width="48" height="48"&gt;
        thebalancecareers.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.lifehack.org/articles/technology/free-ebooks-resources-learn-javascript.html" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--6OR1G4ke--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.lifehack.org/wp-content/uploads/2013/09/Best-Free-Resources-To-Learn-JavaScript.jpg" height="495" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.lifehack.org/articles/technology/free-ebooks-resources-learn-javascript.html" rel="noopener noreferrer" class="c-link"&gt;
          Best Free Resources To Learn JavaScript - Lifehack
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          If you have no previous programming experience but interested in learning programming, JavaScript is the best option for you. Best free resources to learn JavaScript.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--8pS7MqID--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.lifehack.org/wp-content/uploads/2018/05/31002541/lifehack-site-logo-170x170.png" width="170" height="170"&gt;
        lifehack.org
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://www.fullstackacademy.com/blog/learn-javascript-for-free-13-online-tutorials-resources" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kgu1NiSG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://fsa2-assets.imgix.net/assets/IMG_5919.jpg%3Fauto%3Dformat%26crop%3Dfocalpoint%26domain%3Dfsa2-assets.imgix.net%26fit%3Dcrop%26fp-x%3D0.5%26fp-y%3D0.5%26h%3D630%26ixlib%3Dphp-3.3.0%26q%3D82%26w%3D1200" height="462" class="m-0" width="880"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://www.fullstackacademy.com/blog/learn-javascript-for-free-13-online-tutorials-resources" rel="noopener noreferrer" class="c-link"&gt;
          13 Online Resources to Learn Javascript for Every Level
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Whether you’re a beginner coder or a professional developer, these free resources will help you level-up your JavaScript game.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--iwep95jb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.fullstackacademy.com/favicon-32x32.png" width="32" height="32"&gt;
        fullstackacademy.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;div class="ltag__link"&gt;
  &lt;a href="/rahxuls" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--daB7cpwr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--0tQ-rxUk--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/507105/0ce9af0d-fc9f-427b-b24f-da8cfb1f4eb7.png" alt="rahxuls"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/rahxuls/the-ultimate-and-free-javascript-resources-278i" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;The ultimate and free JavaScript resources&lt;/h2&gt;
      &lt;h3&gt;Rahul ・ Nov 17 '20 ・ 3 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#javascript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#github&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;





&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or about this series and i appreciate any feedback to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Conditional statements and loops Practices in Javascript.</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Thu, 14 Apr 2022 09:17:34 +0000</pubDate>
      <link>https://dev.to/osam1010/conditional-statements-and-loops-practices-in-javascript-3i1n</link>
      <guid>https://dev.to/osam1010/conditional-statements-and-loops-practices-in-javascript-3i1n</guid>
      <description>&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%2F9xwyub4itmfwd6why7mz.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%2F9xwyub4itmfwd6why7mz.png" alt="challenge"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;You’ll learn :&lt;/strong&gt;&lt;br&gt;
More about conditional statements if, if else and switch and get better with using them the right way, also you’ll learn when and how to chose one loop statement over others.&lt;br&gt;
Conditional statements :&lt;/p&gt;




&lt;p&gt;1/ Check a number is even or odd :&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%2Fjshljpnf1a9mpw1mk2oa.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%2Fjshljpnf1a9mpw1mk2oa.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2/ Find the largest between two numbers :&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%2Fa7yipg9oe40kgf4whlxm.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%2Fa7yipg9oe40kgf4whlxm.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3/ simple switch code&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%2F0g6fwef471mowbac8v8z.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%2F0g6fwef471mowbac8v8z.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.5/ Switch code&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%2F1em3terek1er30zydy31.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%2F1em3terek1er30zydy31.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4/ Simple calculator with if else :&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%2F1monlotrqt2w5gjwe4dd.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%2F1monlotrqt2w5gjwe4dd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5/ Simple calculator with switch :&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%2Fc7qfsdemllwfp1cxtwdj.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%2Fc7qfsdemllwfp1cxtwdj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loops :&lt;/strong&gt;&lt;br&gt;
1/ Print the summation of numbers between 0 and 10 :&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%2Fsti90j7vzdm8x7jp1vpz.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%2Fsti90j7vzdm8x7jp1vpz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2/ Write a code to print numbers from 1 to 10 :&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%2F0tlqvw7zlc2u09pkqcex.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%2F0tlqvw7zlc2u09pkqcex.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3/ print only even numbers between 0 and 20&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%2F4jvg9d1wn1kl9fngx4mn.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%2F4jvg9d1wn1kl9fngx4mn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4/ simple while loop :&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%2Fk3of7l1w3clo7tjlrs61.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%2Fk3of7l1w3clo7tjlrs61.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;all in one example :&lt;/strong&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%2Flyabas7usidsqwv5fmou.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%2Flyabas7usidsqwv5fmou.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;References :&lt;br&gt;
&lt;a href="https://www.programiz.com/javascript/while-loop" rel="noopener noreferrer"&gt;https://www.programiz.com/javascript/while-loop&lt;/a&gt; , &lt;a href="https://www.learn-js.org/en/Loops" rel="noopener noreferrer"&gt;https://www.learn-js.org/en/Loops&lt;/a&gt; , &lt;a href="https://education.launchcode.org/intro-to-professional-web-dev/chapters/loops/exercises.html" rel="noopener noreferrer"&gt;https://education.launchcode.org/intro-to-professional-web-dev/chapters/loops/exercises.html&lt;/a&gt; , &lt;a href="https://www.programiz.com/javascript/for-loop" rel="noopener noreferrer"&gt;https://www.programiz.com/javascript/for-loop&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or about this series and i appreciate any feedback to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010" rel="noopener noreferrer"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/" rel="noopener noreferrer"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/" rel="noopener noreferrer"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Javascript console.time(), What is it?</title>
      <dc:creator>Osama</dc:creator>
      <pubDate>Wed, 13 Apr 2022 17:30:23 +0000</pubDate>
      <link>https://dev.to/osam1010/javascript-consoletime-what-is-it-2g37</link>
      <guid>https://dev.to/osam1010/javascript-consoletime-what-is-it-2g37</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--n-EFeNOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kkgef50y61v8qetc60b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--n-EFeNOZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kkgef50y61v8qetc60b.png" alt="console.time()" width="360" height="203"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;The console.time() method starts a timer you can use to track how long an operation takes. You give each timer a unique name, and may have up to 10,000 timers running on a given page. When you call console.timeEnd() with the same name, the browser will output the time, in milliseconds, that elapsed since the timer was started. MDN&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Syntax :&lt;/strong&gt;&lt;br&gt;
we first define our timer with console.time and then write the code we need to measure how long it takes to execute and lastly we stop the timer and log the time with &lt;code&gt;console.timeEnd()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fUTaGbbT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hn6niov7iv6hr9p4ckzd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fUTaGbbT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hn6niov7iv6hr9p4ckzd.png" alt="console.time() syntax" width="631" height="206"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;you can use &lt;code&gt;console.time()&lt;/code&gt; to measure how long any task in your code will take to run, so it’s useful what tasks takes long time and then you split the logic of this task into smaller tasks to improve your code performance, since javascript is single-threaded language, any task that take a lot of time will effect your site or application performance badly or even make it not interactive for seconds which is the worst thing may happen.&lt;/p&gt;




&lt;p&gt;Thanks for reading, and feel free to ask any question about javascript or about this series and i appreciate any feedback to improve My content.&lt;br&gt;
find me on &lt;a href="https://twitter.com/Osam1010"&gt;twitter&lt;/a&gt;, &lt;a href="https://github.com/osama865/"&gt;github&lt;/a&gt; and &lt;a href="http://o-portfolio.netlify.com/"&gt;my portfolio&lt;/a&gt;. &lt;/p&gt;

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