Author: Saim Khalid

  • Design Patterns

    In JavaScript, design patterns are classes and communicating objects that are designed to deal with a general design problem in a specific setting. Generic, reusable solutions to typical issues that come up throughout software design and development are known as software design patterns. They give developers a forum to discuss successful design concepts and function…

  • Dead Zone

    What is a Dead Zone? A dead zone in JavaScript is a point during code execution where a variable exists but cannot be accessed. This is because of the behavior of variable hoisting, a mechanism that moves variable declarations to the top of their scope during compilation while leaving assignments intact. Dead Zones (DZs) are…

  • Data Analysis

    Data analysis is essential for modern research and business. It offers information to support innovation, strategy development, and decision-making. Computer languages like Python and R which are known for their vast libraries and statistical capabilities, have historically been linked to data analysis. However JavaScript is best known for web development and is gradually gaining popularity…

  • CORS Handling

    Cross-Origin Resource Sharing (CORS) is a browser-level security feature that, by default, blocks queries across different origins, like a front-end client querying a back-end server hosted on a separate origin or domain. We can use a variety of strategies to avoid or enable cross-origin queries. In this chapter, we will use code examples to demonstrate…

  • Code Testing with Jest

    You can increase your application’s reliability and maintainability by testing your code to find errors earlier using Jest. Jest is a popular choice for JavaScript testing, particularly for applications made using Node.js, React, Angular, and Vue.js. Let us look at Jest’s features and how to use them. What is Jest? The Jest testing framework, created…

  • Circular Reference Error

    When an object creates a direct or indirect reference to itself, it is known as circular referencing. It makes the loop closed. JavaScript has the same circular referencing issue as other programming languages. A few errors of JavaScript circular referencing modes will be discussed in this chapter. What is a Circular Reference in JS? In…

  • Bubble Sort Algorithm

    The stages of Bubble Sort are covered in this chapter, which includes a JavaScript implementation. The word ‘sort’ refers to the process of rearranging the elements in ascending order. Bubble Sort Algorithm Bubble sort is a great starting point for those who are new to sorting. Since its algorithm looks similar how our brains usually…

  • DOM DOMTokenList

    DOMTokenList The DOMTokenList is an interface in DOM (Document Object Model) which represents a set of space-separated tokens (classes). Generally, it is used for managing the classes in HTML elements. It may look like an array, but it is not. Similar to an array, you can loop through a DOMTokenList and access its tokens by index. However,…

  • DOM NodeList

    DOM NodeList The NodeLists are similar to an array or HTMLCollection containing the HTML elements. However, it is not the same as the array or HTML collection. All modern browsers return the node list when you use querySelectorAll() method and childNodes properties. You can traverse the NodeList as an array but can’t use other array methods like map(), filter(), etc, with node lists. The following…

  • DOM Collections

    DOM Collections The DOM (Document Object Model) collections are a way to group together related HTML elements. They are read-only and can be accessed using the properties of DOM objects such as the document object or a DOM node. There are many different types of DOM collections, including: DOM collections can be used to perform a variety…