Categories
Java Script Tutorials

Shuffle an Array by extending built-in objects

Imagine if you transform your data like array for most of the time. Often times for loop with other variables are used to do the job. If it’s repeated than that code is extracted to its own function. Why not we extend the built in Array method and make it simple to use. Shuffle an […]

Categories
Angular Java Script Tutorials

Barrel file benefits in JavaScript

Barrel file is a single place to re export your functions, variables etc for your modules. I have divided this post into Introduction Caveats Case Study

Categories
Electron Tutorials

Writing your first app with Electron

This post is in continuation with the previous posts about creating desktop application using Electron app framework I have covered Introduction in previous post. Our Approach We can get started with two approaches Bottom to top: With this approach we can start really from basics like words, sentence and paragraph and build up. Top to […]

Categories
Tutorials

Swapping variables values hasn’t been that easy in JavaScript

Now with new language features Javascript swap variable values very easily. While doing laundry a thought popped up in my mind and how it relates to JavaScript. Imagine the following picture. Now how you could swap clothes from these two machines. You do need a temporary container to hold clothes from side and make the […]

Categories
Tutorials

Use Recursive Types in Typescript

Interface is such a nice feature in Typescript for custom static type checking. Main reason is to make your code less error prone but I use it primarily for intellisense. Today we will be discussing recursive types. I need to modal the accordion in HTML using following object. { title: “Parent”, expanded: true, subItems: [ […]