https://ankitkamboj18.medium.com/event-loop-model-javascript-6bef1ec8cc44
https://ankitkamboj18.medium.com/event-loop-model-javascript-6bef1ec8cc44
https://ankitkamboj18.medium.com/event-loop-model-javascript-6bef1ec8cc44

EventLoop: What the Heck is Event Loop..?

The Event Loop is a queue of callback functions. When an async function executes, the callback function is pushed into the queue. The JavaScript engine doesn’t start processing the event loop until the code after an async function has executed.

In web browsers, messages are added anytime an event occurs and there is an event listener attached to it. If there is no listener, the event is lost. So a click on an element with a click event handler will add a message — likewise with any other event.

The function setTimeout is called with 2 arguments: A message to…


Webpack (https://ankitkamboj18.medium.com/)

What is Webpack?

Webpack is a module bundler. It takes the code you write and bundles it. But Webpack can also transpile, combine, and minify your code. It allows for code splitting, in which the client can load blocks of code on demand rather than having to send one huge file to the client. Webpack is also compatible with React.js.

Webpack requires that the code be divided into modules. You can use any module system (AMD, CommonJS or ES6 Modules). This guide will use ES6 modules, but feel free to adapt the solutions to the module system of your choice.

Why Webpack?

Using a module…


Introduction

In this article, we’ll dive into Relationship Mapping with JPA and Hibernate in Java.

JPA is the persistence standard of the Java ecosystem. It allows us to map our domain model directly to the database structure and then gives us the flexibility of manipulating objects in our code — instead of messing with cumbersome JDBC components like Connection, ResultSet, etc.

We’ll be making a comprehensive guide to using JPA with Hibernate as its vendor. In this article, we’ll be covering relationship mappings. It will going to be a bit longer article but you will get overall clarity, so be focused.

What we will cover here:


This article is based on Free Code Camp Basic Algorithm Scripting “Find the Longest Word in a String”.

In this algorithm, we want to look at each individual word and count how many letters are in each. Then, compare the counts to determine which word has the most characters and return the length of the longest word.

In this article, I’m going to explain three approaches. First with a FOR loop, second using the sort() method, and third using the reduce() method.

Algorithm Challenge

Return the length of the longest word in the provided sentence.

Your response should be a number.

Provided test cases

  • findLongestWord(“The…

Javascript runtime is single threaded which means that it can execute one piece of code at a time. In order to understand the concurrency model and the event loop in Javascript we have to first get to know some common terms that are associated with it.

The call stack

First let’s learn about what a call stack is.

A call stack is a simple data structure that records where in the code we are currently. So if we step into a function that is a function invocation it is pushed to the call stack. When we return from a function it is popped out of the stack.

Let’s look at a code example to understand the call stack:

function multiply(x,y) {
return x * y;
}
function squared(n) {
return multiply(n,n)
}
function printSquare(n) {
return squared(n)
}
let numberSquared = printSquare(5);
console.log(numberSquared);

First when the code executes the…


Big O Notation

1. Overview

In this tutorial, we’ll talk about what Big O Notation means. We’ll go through a few examples to investigate its effect on the running time of your code.

2. The Intuition of Big O Notation

We often hear the performance of an algorithm described using Big O Notation.

The study of the performance of algorithms — or algorithmic complexity — falls into the field of algorithm analysis. Algorithm analysis answers the question of how many resources, such as disk space or time, an algorithm consumes.

We’ll be looking at time as a resource. Typically, the less time an algorithm takes to complete, the better.

ll be looking…


Service Workers are a virtual proxy between the browser and the network. They finally fix issues that front-end developers have struggled with for years — most notably how to properly cache the assets of a website and make them available when the user’s device is offline.


Why React , 12 reasons why React JS is getting so popular let’s deep dive quickly✍🏻

Why React JS is so popular.
Why React JS is so popular.
ReactJS_Popular

ReactJS is an open-source library created and maintained by facebook. Right now it has more than 60.000 stars on Github and the surrounding community is getting bigger and bigger. Many well-established companies or fast developing startups have decided to use it in order to provide responsive and modern user interfaces by taking advantage of its powerful features.

So let’s see why ReactJS has become so popular during last 2 years:

1. ReactJS is the view layer in our applications and it does this job…

AnKiT KaMbOj

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store