What is Functional Programming?

Advanced javascript Ecma Script Es6

We usually heard about new version of Javascript which is Ecma script which involves much advanced function to solve complex array and objects we will discuss in this article how to handle or interact with it.First lets start with the basics concepts.

Var V/S Const & Let

In vanilla javascript we usually used var keyword to initialize,reinitialize,declare,and reassign values.It has a global scope means it can easily calls inner and out of the blocks of functions.

Where as let has block scope it does not call out of the block

const is used to store values that can not change in future but if you wanna change it you have to initialize it with the const keyword again

As you can seen here variable with var keyword changed but let innerScope throw error when we console it.

What are Hells

There are various ways to write hells and we usually used it in our normal code to do asynchronous task that require some time to execute other wise .vanilla javascript is synchronous execute line by line

promise example that runs on condition basis
fetch to get post from remote server using fetch
hell with async and await

Spread | Rest | Destructing

All Operators are used to handle arrays and object to display according to the user needs in which they required.

  • Spread: Used to copy array,object element into another array, object
  • Rest: Used for to take multiple arguments and return result into a array form
  • Destruction: Get the value location wise in array and name wise in objects

Call Backs functions V/s Traditional functions

There are many callbacks that are availaible in modern javascript and we can write our own custom callback also but we have variety of callbacks in es6 for example map is used to iterate a array,filter return array on a condition basis reduce used to return a sum of array

Template Literals

These are the backtiks used to concatenate string and variable with it in old javascript we used plus sign to join it.

Two ways to display string concatenations

Default Parametors

In Modern javascript we execute the function with or without parametors in it.Execute function with parametors overrides the default values otherwise it will take default parametors if we dont passed in a function calling

default parametors example

Export V/S Import

export and import used vice versa it depends whether you exporting your module in function form variable form or import it in your own component respectively to utilize it in your code

Enthusiastic and passionate learner Javascript React Node Angular React Native

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store