Advanced JavaScript Tutorial in Hindi [Part 93] - JavaScript Arrow function in ES6

Tech Gun
Youtube
Related Topic
:- Web Development Javascript

 In this video i will talk about JavaScript Arrow function in ES6. Arrow function is one of the features introduced in the ES6 version of JavaScript. It allows you to create functions in a cleaner way compared to regular functions. Arrow functions are handy for one-liners. They come in two flavors: Without curly braces: () = expression – the right side is an expression: the function evaluates it and returns the result. With curly braces: () = { body } – brackets allow us to write multiple statements inside the function, but we need an explicit return to return something. Arrow functions, introduced in ES6, provides a concise way to write functions in JavaScript. Another significant advantage it offers is the fact that it does not bind its own this. In other words, the context inside arrow functions is lexically or statically defined. What do we mean by that? 

Comments