Default Function Parameters In ES6

default function parameters in es6

It’s a little bit surprising that before ES6, JavaScript did not have support for default values given to function parameters. Most languages allow you to set a default value to any particular function parameter during the declaration of that function. This is what makes it possible to use a function with both mandatory parameters and optional parameters. If you didn’t provide the optional parameter, it would just get set to a default.…

ES6 Arrow Function Tutorial

es6 fat arrow syntax

Let’s take a look at ES6 arrow functions. If you’ve spent any amount of time programming JavaScript, you know that after awhile, it feels like you’re typing out that function keyword over and over and over. You write a function here, you write a function there. Here a function, there a function, every where a function function. That’s because anytime you want something to actually happen in your script, you need to write another function!…

ES6 let vs var vs const

es6-let-vs-var-vs-const

ES6 let vs var vs const, oh my! ES6 is here, and developers are making use of it now. There are a lot of differences between ES6 and it’s predecessor ES5, and if you want to make use of the new features available to you, you need to learn about how things work in ES6. In this tutorial, we’ll start out at the very beginning in ES6 and examine the new let keyword, const keyword, as well as block scope in ES6.…