Category: Advanced Chapters

  • Require() Function

    Files with JavaScript code that performs a specific task are called modules. It is easy to add, remove, and update functionalities without affecting your entire code because modules are self-contained and separated from other parts of code. If these modules are in separate JavaScript files you should use them inside the original JavaScript code. In…

  • Reactivity

    In web development responsiveness refers to how a system responds to changes in data. This concept is important for creating modern, dynamic web applications in which user actions need speedy responses like updating a page without reloading it or dynamically changing what the user sees when data is updated. This chapter covers some powerful JavaScript…

  • Prototypal Inheritance

    Prototypal Inheritance The classical inheritance phenomenon involves making a new class that actually extends or reuses the attributes, functions, or methods of another class that are used by different programming languages (like C, C++, Java, and so on). JavaScript uses Prototype Inheritance rather than classical inheritance. Prototype Inheritance happens when one object uses the prototype…

  • Parse S expressions

    The Lisp programming language family is built around S-expressions. In this article, you will learn about the steps of making a simple S-expression parser. This can form the basis for the Lisp parser. Lisp is the easiest language to implement and creating a parser is the first step. We can use a parser generator for…

  • Package Manager

    In JavaScript, a package manager is a tool that makes simple to install, manage, and update libraries, or packages, in your project. You can save time and add functionality without having to start from scratch by using these packages, which are reusable code pieces provided by other developers. Need of a Package Manager Suppose there…

  • Mutability vs Immutability

    If you are a web developer you have seen the terms mutable and immutable objects in JavaScript. But what these words mean, and why do they matter? This section will help you understand. This knowledge is very helpful for writing cleaner, safer, and more reliable JavaScript code. Mutable Objects Mutable objects in JavaScript are ones…

  • Minifying JS

    JavaScript enables dynamic and interactive features on websites and web apps. It is a key component of modern web development. But as JavaScript files grow larger and more complex, they can significantly affect page load times and overall speed. To solve this issue, developers use techniques like code minification to make JavaScript code simpler without…

  • Memoization

    As our systems grow and start doing more complex calculations, the need for speed grows and process optimization becomes necessary. Ignoring this issue results in applications that use a lot of system resources and operate slowly. In this chapter, we will discuss memoization, a technique that can significantly reduce processing time when used properly. What…

  • Local Storage

    This chapter will show you how to use JavaScript’s localStorage to save data for several browser sessions. We will demonstrate how to use this method using the Window.localStorage property, as well as go over the principles of web storage in JavaScript. What is localStorage in JavaScript? The localStorage feature allows JavaScript apps and websites to save key-value…

  • Lexical Scope

    What is Lexical Scope? Lexical scope refers to an expression’s definition area. In other words, an item’s lexical scope is the context in which it was generated. Lexical scope is sometimes known as static scope. The lexical scope of an item is not always determined by where it was invoked (or called). The lexical scope…