Author: Saim Khalid

  • 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…

  • Functional Programming

    There are mainly two programming paradigms: The imperative programming paradigm and the declarative programming paradigm. Functional programming is a subtype of the declarative paradigm. The paradigm word refers to the approach to solving a particular problem. Functional programming has been in use for the last decades but came in the trend after 2015 when the…

  • Form Handling

    We can handle forms in different ways like validating, submitting, altering, updating form data, etc. using JavaScript. Form Validation Form validation normally occurs at the server, after the client had entered all the necessary data and then pressed the Submit button. If the data entered by a client was incorrect or was simply missing, the server would…

  • Empty String Check

    String is a data type, which we can use to save the data present in text format. It is a sequence of characters inside the double or single quotes. Sometimes we need to check whether the string is empty or not. In JavaScript, we can check the empty string using the following methods. Using the…

  • Higher Order Function

    A higher order function accepts other functions as parameters and returns a function. To know about Higher-order functions, we should learn about call back functions. A call back function is a function that is passed to another function as an argument. With the help of call back functions, one function can call another function and…

  • Graph Algorithms

    A graph is a data structure which consist nodes and edges. The node are simply vertices and the lines which connect them are edges. Graph is non-linear data structure. A Graph algorithms in JavaScript are used to solve the graph problems. These algorithms are used to traverse the graph, find the shortest path, etc. We…