Category: Advanced Chapters

  • Async Iteration

    Asynchronous Iteration In JavaScript, asynchronous iteration refers to the ability to iterate over asynchronous sequences or collections, such as those returned by asynchronous functions or generators. Async iteration is typically used with operations that involve asynchronous tasks, such as fetching data from a remote server or reading from a file. Understanding Asynchronous Operations In basic…

  • Validate URLs

    In this chapter, we will learn how we can validate URLs in JavaScript. Before knowing how to validate URLs, let’s understand what a URL is. What is a URL? A URL or Uniform Resource Locator identifies web pages, images, and videos on the internet. URLs are website addresses that transfer files, send emails, and many…

  • Unit Testing

    Unit testing is must in software development life-cycle. It is a process in which we can test small units of code individually to ensure that they are working correctly. In JavaScript, we can use various unit testing frameworks to test our code. Unit testing help us to find bugs early in the development process. Instead…

  • Undefined Check

    When the value is absolutely not present in the variable or string or anything else, we call it as Undefined. In JavaScript, undefined is a one of the primitive data type. It is used to represent the absence of a value. It get assigned to a variable when it is declared but not assigned any…

  • Short Circuiting

    In JavaScript, short-circuiting is a feature that checks conditions and stops as soon as it knows the answer. It doesn’t look for the rest of the expression, and that prevent unnecessary evaluations. Short-Circuiting for && operator Short circuit evaluation with &&(AND) logical operator means if the first expression evaluates to false then whole expression will be false…

  • Rest Operator

    There are times when we want to pass any number of arguments to a function or want to get specific elements separately from an array or object. In such cases, we can use the rest operator. What is Rest Operator? The rest operator () allows us to call a function with any number of arguments…

  • Reduce Method

    What is Reduce Method? In JavaScript, Reduce method is used to manipulate array. This method executes a reducer function on each element of the array (from left to right) and returns a ‘single value’ as a result. It accepts an optional parameter named ‘initialValue’. If we do not pass this parameter to the method, it will consider the arr[0]…

  • Reactive Programming

    Reactive Programming is basically a way to write code that makes it easier to deal with things happens over timelike data coming from a network, users clicking on stuff, or updates popping up in a database. In reactive programming, we look at data as a stream of events. So instead of just waiting a lot…

  • Prototype

    Prototype is like a template in JavaScript. These template help object to share the properties and methods. Instead of duplicating code everywhere, we can define method or property once and then can easily share with other instances of an object. Types of Prototype in JavaScript In JavaScript, there are more than one type of prototype…

  • Parameters vs Arguments

    Parameters and arguments are terms that are used for the function. Both are generally confused with each other. But they are different from each other in JavaScript. In this tutorial, we will learn about the difference between parameters and arguments in JavaScript. Parameters Parameters are variable names that are used in the function definition. They…