Blog Archives

What is a WeakMap in ES6?

A WeakMap is just like a normal Map with a few key differences: a WeakMap can only contain objects as keys, a WeakMap is not iterable which means it can’t be looped and a WeakMap does not have a .clear()

Tagged with: , , , , , ,
Posted in ES6, JavaScript

ES6 Default Function Parameters

Unlike the defining the default values in JavaScript, ES6 has provided a flexibility to define the default values during the function definition time.  In regular Javascript, we define a variable with one value, override that value with in the function

Tagged with: , , , , , ,
Posted in ES6, JavaScript, Struts

Arrow Functions in ES6

ES6 introduces a new kind of function called arrow function. Arrow functions are very similar to regular functions in behavior, but are quite different syntactically. They will save developers time and simplify function scope. The following code takes a list

Tagged with: , , , , , , , , ,
Posted in ES6, JavaScript

ES6 variable declaration – let and const

In standard Javascript, the only way to declare a variable in JavaScript was to use the keyword var. But, in ES6 there are now two new ways to declare variables in JavaScript: let and const. let and const have some other interesting properties. Variables

Tagged with: , , , , ,
Posted in ES6, JavaScript

Example Program to combine arrays in ES6

Here is one example of when the spread operator can be useful is when combining arrays. If you’ve ever needed to combine multiple arrays, prior to the spread operator, you were forced to use the Array’s concat() method. const fruits = [“apples”,

Tagged with: , , , , ,
Posted in ES6, JavaScript

ES6 Spread Operator

The spread operator, written with three consecutive dots ( … ), is new in ES6 and gives you the ability to expand, or spread, iterable objects into multiple elements.

Tagged with: , , , , ,
Posted in ES6, JavaScript

ES6 for…of Example Program – Replace first letter of String with Uppercase

Below example iterates days array using for…of operation in ES6 and replaces the first character of the day with upper case. /* * Programming Quiz: Writing a For…of Loop (1-4) */ const days = [‘sunday’, ‘monday’, ‘tuesday’, ‘wednesday’, ‘thursday’, ‘friday’,

Tagged with: , , , , ,
Posted in ES6, JavaScript

NgModule Properties in Angular 2

NgModule is a decorator function that takes a single metadata object whose properties describe the module. The most important properties are: declarations – the view classes that belong to this module. Angular has three kinds of view classes: components, directives,

Tagged with: , , , , ,
Posted in Angular

Components of Angular 2

Below are the major  components of Angular 2 Modules − This is used to break up the application into logical pieces of code. Each piece of code or module is designed to perform a single task. Component − This can

Tagged with: ,
Posted in Angular

Angular 2 Features

Angular 2 is a opensource javascript framework developed by developers at google. This framework is used to build the single page applications. Angular 2 has been built by considering the difficulties faced in Angular 1 and Angular 2 removes the

Tagged with: , , , , ,
Posted in Angular

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

May 2018
« Mar    
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 258,903 hits