Strange behavior with JavaScript

JAVASCRIPTThere are numerous occasions where JavaScript behaves strangely.I love the frameworks written on top of javascript but do not prefer to write code in javascript.Please find below cases where javascript behave differently:Scenario 1As shown below, see addition and subtraction.11+1 //12'11'+1 //11111-1 //10'11'-1 //10 //What is hell? right?Scenario 2JavaScript is very loosely concerning data types.let name="Sukhpinder";setTimeout(function(){ … Continue reading Strange behavior with JavaScript

Why is JavaScript so hated?

Image by Alltechbuzz from PixabayThere are numerous occasions where JavaScript behaves strangely.I love the frameworks written on top of javascript but do not prefer to write code in javascript.Please find below cases where javascript behave differently:Scenario 1As shown below, see addition and subtraction.11+1 //12'11'+1 //11111-1 //10'11'-1 //10 //What is hell? right?Scenario 2JavaScript is very loosely concerning … Continue reading Why is JavaScript so hated?

Visualize Data Structures in Debug Mode.

VS CODE EXTENSIONData Visualization DebuggerVisualizing data structure modifications utilizing the debugging view provides a very precise picture of exactly what happens with each operation. This article covers the visual debugger through an exploration of the following examples:Line Graph plotting — TypescriptLinked List plotting — C# Console ApplicationBefore starting, let’s look at how to access Visual DebuggerFirst, get the following extension … Continue reading Visualize Data Structures in Debug Mode.

AuthGuard Authentication

ANGULAR PROGRAMMINGAuth guard is an angular route guard that is used to stop unauthenticated or unauthorized users from accessing the protected routes.It is implemented using the “CanActivate” interface, which allows the guard to decide if a way can be activated with the “CanActivate()” method.If the method returns “true,” then the route is activated(allowed to proceed).If … Continue reading AuthGuard Authentication

Parse JWT token in angular

ANGULAR PROGRAMMINGThis article demonstrate how to interpret a JSON Web Token inside an angular application.PrerequisitesRefer below link for an introduction to JSON Web Token(JWT)Getting StartedStep 1: Install below package using npm command:npm install jwt-decodeStep 2: Create JwtService.ts file in angular project directory & write a decode function as shown below (Refer screenshot)import * as jwt_decode … Continue reading Parse JWT token in angular