Monthly Archives: February 2018

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

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

Join 678 other followers

Calendar
February 2018
M T W T F S S
« Aug   Mar »
 1234
567891011
12131415161718
19202122232425
262728  
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
  • 271,322 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100