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 readingCategory: JavaScript
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 readingTypeScript: 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 readingWebpack: 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 readingLodash: 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 readingInteractive 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 readingWhat’s new TypeScript 2.4
This is my first blog post on TypeScript open source programming language. I really impressed with the TypeScript benefits after working with Angular framework for quite some time. Of course, it is also very popular in other JS based frameworks such as ExpressJS, ReactJS, VueJS and so on. If you have prior knowledge on Object-Oriented Programming(OOPs) based languages(for example, java)
Continue reading