How to reverse an array without mutating original array

The reverse() method reverses the order of the elements in an array but it mutates the original array. Let’s take a simple example to demonstrate this case, const originalArray = [1, 2, 3, 4, 5]; const newArray = originalArray.reverse(); console.log(newArray); // [ 5, 4, 3, 2, 1] console.log(originalArray); // [ 5, 4, 3, 2, 1] There are few solutions that won’t mutate

Continue reading

JavaScript: What’s new in ES2020?

ES2020 is the current newer version of ECMAScript corresponding to the year 2020. This is the eleventh edition of the ECMAScript Language Specification. Even though this release doesn’t bring as many features as ES6, it included some really useful features. Most of these features already supported by some browsers and try out with babel parser support for unsupported features. This

Continue reading

My review on “Java By Comparison” book

Recently I received a print copy of book titled “Java By Comparison” authored by @simonharrer along with two more co-authors. As the book states “become a Java Craftsman in 70 example”, this book is mainly focused on improving your Java coding skills with set of  examples as best practices. The book is published on March 2018 and available in amazon

Continue reading

How to upgrade Angular5 projects to Angular6?

Did you ever feel that it is going to be very difficult to upgrade Angular5 project to Angular6.x version. It might be “Yes” for many developers. Even I faced many errors while upgrading my PrimeNG-Extensions project (https://github.com/sudheerj/primeng-extensions) to Angular6.x version. If you try to upgrade the Angular6 dependencies manually with in your package.json file and then renaming .angular-cli.json to angular.json, you will

Continue reading

TypeScript: A strict typed language for JavaScript world

TypeScript is a free and open-source typed superset of javascript(in other words ECMAScript 2015) that compiles to plain javascript. So every javascript program is a valid typescript code. The typescript can be used in both client side and server side javascript applications. Actually it is meant for developing large scale applications where you can get the huge benefit of typescript.The typescript compiler itself is written

Continue reading

Webpack: A module bundler for JavaScript applications

Webpack is an open-source JavaScript module bundler for JavaScript applications. The bundler can be used from the command line(CLI) or configured using a config file named webpack.config.js. It takes modules with dependencies and generating static assets representing those modules. Nowadays, Webpack is a leading bundler for Angular, React and Vue frameworks with various templates.  Due to it’s unique syntax who are new to Webpack

Continue reading

Lodash: A modern JavaScript Utility library

Lodash is an open source(MIT licensed) modern javascript utility library to ease the programming tasks in a functional programming paradigm. The main goal of this library is modularity, performance and simplicity. This library handles the hard parts of javascript across various types of data such as Arrays, objects, strings, functions, date and so on. This project is inspired by UnderScore utility library.

Continue reading

Interactive command line interface using InquirerJS

InquirerJS is an easily embeddable and beautiful command line interface for NodeJS projects. I found this library while I was working with JHipster-PrimeNG module. JHipster provides various modules to generate the modern web applications with the help of Yeoman generator. Internally Yeoman generator uses this library for an interactive question and answer prompts through CLI. But we can use this

Continue reading

My review on Beginning Spring Boot 2.0 Book

In this post I’m going to provide my review comments on  ‘Beginning Spring Boot 2.0’ book written by Siva Prasad Reddy. I know the author of this book very well by working as a technical reviewer for one of his previous book titled “PrimeFaces Beginner’s guide”.  This book is divided into 19 smaller chapters to make the concepts clear. Each

Continue reading