Arrow functions

I'm pretty impressed with Arrow functions in ECMAScript6. An Arrow function is very simple when compared to traditional function expressions. Arrow functions are always anonymous and do bind its own this, arguments, super and new.target properties. So, we can simply say Arrow functions are shorter functions and non-binding of this. Let's begin with exploring shorter…

Writing function in JavaScript

Let us create a function called cool and call it immediately and then we shall create the same function with small change in console message as follows. function cool(){ console.log('first function'); } cool(); function cool(){ console.log('second function'); } cool(); When we execute the above JavaScript code, we will get the output as second function second…

%d bloggers like this: