In this blog we will create a setup to get streaming data from backend and log it in the frontend. The ideal solution today to handle streaming data is through WebSocket. But initialising the WebSocket in the main thread would slow down the website and make it feel laggy since constantly it would be handling the server data that is pushed in through the WebSocket.

One way to do this efficiently is by initialising the WebSocket inside a WebWorker. To be brief, WebWorker does not execute in the main thread instead it will be executed in a separate thread in…


A deep dive into the workings of Javascript functions.

Most of the work that is possible today with Javascript is because of the flexibility of the language in itself. This flexibility that Javascript provides is highly because of its functions work. I will try to cover most of the important parts that needs to be understood to have a indepth idea of how JS functions work. These are the topics that we are going to cover.

  • Ways to declare and call a function
  • Optional arguments & Default arguments
  • Function bindings & call stack
  • Arguments keyword & strict mode
  • Closures
  • Recursive…


ReactJS has been in the web development industry for a long time now and for people who have been using react for a long time and need some quick overview of what the library has to offer is covered here. This is kind of a reference guide about the important conceps of ReactJS. I am assuming you have some prior knowledge on ReactJS.

Topics Covered

  1. React Components & Pure React Components
  2. Context
  3. Higher Order Component
  4. Memo
  5. Error Boundaries
  6. Fragments
  7. Suspense
  8. Hooks

React Components & Pure React Components

The difference between React Components and Pure React Components is that pure react components will give you the same HTML content…


Working with numbers in javascript is a bit tricky when compared to other programming languages. We will see why in a bit. So the structure of this blog is as follows.

1. Characteristics of Numbers in Javascript
2. Special Numbers
3. How to represent big numbers?

Characteristics of Numbers in Javascript

Numbers in Javascript are represented by a Fixed 64 bits length. These 64 bits are split and used in specified order to represent a number.

Sign — 1Bit

Exponent — 11Bits

Significand — 52Bits

This representation is called the double precision floating point format for representing numbers

The maximum safe limit of numbers that…


Javascript usually abbreviated as JS is being used everywhere nowadays from browsers to servers and has a variety of use cases in the real world. It is the most misunderstood language and the most criticized language. I agree it is not as performant as the other languages available but when used properly I think it is one of the most easy to understand and adopt. And a lot of work is being going on to improve the language. The general characteristics and the most important ones of JS are as follows

  1. High Level language
  2. Just in time compiled
  3. Multi Paradigm

John Peter

Senior Software Engineer — Frontend @Freshworks.

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