Javascript Road Trip(es6)

12
Javascript Road Trip (2) (ECMASCRIPT 2015) Presented By: Ahmed Assaf

Transcript of Javascript Road Trip(es6)

Javascript Road Trip (2) (ECMASCRIPT 2015)Presented By: Ahmed Assaf

WWW.ITWORX.EDUCATION 2

ContentECMASCRIPT 2015Const & LetArrow FunctionExtended Parameter HandlingModule Class

WWW.ITWORX.EDUCATION 3

Const & LetSupport for constants (also known as "immutable variables"),

i.e., variables which cannot be re-assigned new content.

WWW.ITWORX.EDUCATION 4

Arrow FunctionExpression Bodies : More expressive closure syntax.

Statement Bodies : More expressive closure syntax

Lexical this : More intuitive handling of current object context

WWW.ITWORX.EDUCATION 5

Default Parameter Values

Extended ParameterRest Parameter : Aggregation of remaining arguments into single parameter

Spread Operator : Spreading of elements of an iterate collection (like an array or even a string) into both literal elements and individual function parameters.

WWW.ITWORX.EDUCATION 6

ModulesValue Export/Import : Support for exporting/importing values from/to modules without global namespace pollution.

Some additional features include export default and export *:

WWW.ITWORX.EDUCATION 7

ClassesClass

DefinitionClass Inheritance

WWW.ITWORX.EDUCATION 8

ClassesBase Class

Access

WWW.ITWORX.EDUCATION 9

ClassesStatic

Members

WWW.ITWORX.EDUCATION 10

ClassesGetter/Setter

WWW.ITWORX.EDUCATION 11

References• http://es6-features.org/• https://github.com/DanWahlin/MasteringJavaScriptCourseCode/

tree/master/Mastering%20JavaScript/samples/jsObjects• https://developer.mozilla.org/en/docs/Web/JavaScript/Reference• https://babeljs.io/docs/learn-es2015/

Thank You