JavaScript

JavaScript is a high-level, dynamic, multi-paradigm, object-oriented, prototype-based, weakly-typed language used for both client-side and server-side scripting. Its primary use is in rendering and performing manipulation of web pages

javascript js es6 angular react

5 Different ways to Create Loops in JavaScript

JavaScript loops are a great way to execute a block of code repeatedly. In this tutorial, you will learn about all loops, the for, while, do...while, for...in and for...of, and how to use each of them. You will also learn about the problem with infinite loops and what to watch out for. Learn everything you need to know about looping in JavaScript

How does Scope work in JavaScript

Scope is one of the most important topics in JavaScript. In this tutorial, you will learn about what scope is. Then, you will learn about types of scope and how they work. You will also learn about ES6 variables, block statements, why they matter for scope. Lastly, you will also learn about closures.

JavaScript Arrow Functions  - What you Need to Know

In this article, you will learn about arrow functions, the syntax, parameters, parentheses and curly brackets, and when you can omit them. You will also learn about implicit and explicit return, immediately invoked arrow functions and the main differences between arrow functions and functions.

Implement a .bind() polyfill in Javascript

Writing your own .bind() implementation is a common question asked in Javascript interviews at companies like Microsoft, Walmart, Flipkart to name a few. Lets see how to tackle such problems in this post.For such questions, you are expected to implement the functionality from scratch.

How to Use Shallow Copy and Deep Copy in JavaScript

In this tutorial, you will learn about what is a deep copy and what is a shallow copy. Next, you will learn about what does “by value” and “by reference” mean. After that, you will also learn about when JavaScript creates shallow copies and when deep, and how to create deep copies of arrays and objects when you need them.

Get started with Regular Expressions in JavaScript

In this tutorial, you will learn all you need to get started with regular expressions in JavaScript. You will learn how to create new expressions, how to use them and how to test them. You will also learn how to create simple and complex patterns and about special symbols and characters.

How “this” in JavaScript Works - Things Need to Notice

The this keyword can be very confusing. This tutorial will help you understand how it works. You will learn about how this works in different contexts and environments. These contexts include global object, functions, object and class methods and events. You will also learn about globalThis, new feature added in ES2020.

Master Solidity Arrays [Master Solidity #3]

🤑 Become an in-demand blockchain MASTER: https://dappuniversity.com/bootcamp 📕Get the FREE Step-By-Step

How to get the first n items in an array in JS

Given a JavaScript array, how do you get just the first X items of it? Use the built-in slice() method that comes with each array instance: const arrayToCut = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] const n = 5 //get the first 5 items const newArray = arrayToCut.slice(0, n) Note that the original array is not modified in this operation.

How to merge arrays without duplicates in JavaScript?

Learn how to merge two or more arrays in JavaScript, in three different ways. Also, learn about the time complexity of each method.

How to divide an array in multiple equal parts in JS

I had a problem. An array contained a lot of items, and I wanted to divide it into multiple chunks. I came up with 2 completely different solutions. A) The first was to divide the array in equal chunks, for example chunks of 2 or 3 items B) The second was to create n chunks and add an equal variable set of items to it It’s different how and why we divide.

Most useful array method: filter and map - JSGrip

Map and Filter use for array, Map method use for modification object and element and filter method use for search array element using condition.

Building A Vanilla JavaScript Todo App From Start To Finish | EP 2

In the first part of the Building A Vanilla JavaScript Todo App From Start To Finish series we started to setup the project and prepared the basic HTML page by including things like Google Fonts, and the Font Awesome Icon library. We now ready to go on and extend the application by bringing in the UI element we need.

Using the Array flat method

If you ever need to condense a multi-dimensional array of values into a single list of values, the Array flat( ) method is what you need .

Iterating an Object Tree with Arrays

In this tutorial we are going to continue dealing with iterating through an object. This time we will add an array to the mix and look at how we can deal with that.

Road to Genius: advanced

Each day I solve several coding challenges and puzzles from Codr’s ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, and you will learn a ton of new and interesting things as you go.

What is the Best Way to Clear an Array?

Let's say you are using an array to track data. And at times you need to clear out that array. What is the best way to do that and why?

How to Create Custom React Hooks

Quite some time has passed since we introduced hooks in the codebase of our projects. Because of them, it has made the code reusable, cleaner, more readable and more satisfying to write. How to Create Custom React Hooks

Excel-like DataGrid component for React JS

Rows n' Columns Grid .Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets and more

Minimalistic and extensible notification service for Angular

angular-notify .A minimalistic (and extensible) notification service for Angular.