WEBVTT

00:00.000 --> 00:10.920
JavaScript ES6 features. In this video we will understand ES6 features.

00:10.920 --> 00:19.920
Introduction to ES6 ES6, ECMA script 2015, is an updated version of JavaScript in

00:19.920 --> 00:25.720
2015 that introduced new features to make coding more efficient, readable,

00:25.720 --> 00:31.460
and powerful programs. We will explore some important features of ES6 and how

00:31.460 --> 00:36.640
the same examples would look before ES6 with the help of this code. Let and

00:36.640 --> 00:42.840
const, let and const are used to declare variables in JavaScript, where let

00:42.840 --> 00:47.400
allows reassignment, changing the value layer, and const does not allow

00:47.400 --> 00:53.600
reassignment. The same code was written with bar before ES6, differences between

00:53.600 --> 01:02.600
bar, let and const. Bar is function-scoped, redeclareable,

01:02.600 --> 01:08.760
reassignable, and hoisted with undefined. Let is block-scoped, not redeclareable,

01:08.760 --> 01:15.920
reassignable, and hoisted, un-initialized. Const is block-scoped, not redeclareable,

01:15.920 --> 01:22.320
or reassignable, and hoisted, un-initialized. Other important ES6 features

01:23.280 --> 01:29.240
Arrow functions. Arrow functions provide a shorter and cleaner way to write

01:29.240 --> 01:33.560
functions in JavaScript. The same function was written using regular function

01:33.560 --> 01:41.760
syntax before ES6. Template literals. Template literals allow embedding

01:41.760 --> 01:47.480
variables inside strings, using backticks instead of concatenation. The same

01:47.480 --> 01:53.720
was written using string concatenation before ES6. In conclusion, we

01:53.720 --> 01:59.920
explored ES6 features like let, const, arrow functions, and template literals for

01:59.920 --> 02:02.360
better coding.

