SlideShare a Scribd company logo
ECMAScript 6
Getting Started with ES6
http://goo.gl/OuwX9t
Nitay Neeman
⚬ What is ECMAScript 6?
⚬ Brief history
⚬ A lot of new features
⚬ Conclusions
We will talk about
ECMAScript 6 is new standard of ECMA International.
Scheduled to be released on June 2015.
The project name is Harmony.
What is ES6?
ECMAScript is a standard of scripting languages.
Actually, it is the syntax.
JavaScript is an implementation of standard by specific
browsers.
There are many others implementations:
JScript, ActionScript, Ejscript, Objective-J, Nashorn…
All those very similar and depend on the application
that executes them.
Differences between ES & JS
⚬ 1995 - LiveScript was born by Brendan Eich of Netscape (in 10
days!).
In the end of year, the name changed to JavaScript in order to
attract Java developers.
⚬ 1996 - Microsoft came and copied JavaScript for supporting of IE.
It was called JScript. Meanwhile, JavaScript was delivered to ECMA
International in purpose to be a standard of scripting languages.
⚬ 1997 - JavaScript was adopted by ECMA as ECMA-262 standard.
⚬ 1999 - Main version was ECMAScript 3.
Until this version, everything was fine...
Brief History
⚬ 2000 ~ 2007 - ECMAScript 4 planned to provide a lot of complex
features. Microsoft, Yahoo & Google refused and started to develop
ECMAScript 3.1.
⚬ 2008 - Brendan Eich was back and announced that Ecma TC39
would focus work on the ECMAScript 3.1.
It was decided:
1. ECMAScript 3.1 will rename to ECMAScript 5.
2. ECMAScript 4 will rename to ECMAScript 6.
⚬ 2009 - ECMAScript 5 was published.
⚬ 2015 - ECMAScript 6 will be published.
Brief History
Cool history, but.. I WANT CODE!
A new and short way to create an anonymous function.
Arrow function created to be more semantic and readable.
Example of using:
Important issues:
⚬ It is not newable (will throw an error when you try..)
⚬ It can be used in expressions and in statements.
⚬ Fixed ‘this’ issue!
Arrows
var square = x => x * x;
The following code will not work (‘this’ will be the Window object):
Arrows - The meaning of ‘this’ issue
var timer = function () {
this.seconds = 0;
this.printSeconds = function () {
console.log(this.seconds);
};
setInterval(function () {
this.seconds++; // We cannot call to seconds field here
this.printSeconds(); // We cannot call to printSeconds here
}, 1000);
};
var myTimerInstance = new timer();
The solution based on arrow function:
Arrows - The meaning of ‘this’ issue
var fixedTimer = function () {
this.seconds = 0;
this.printSeconds = () => console.log(this.seconds);
setInterval(() => {
this.seconds++;
this.printSeconds();
}, 1000);
};
var myFixedTimerInstance = new fixedTimer();
Block-level Scope
Until now, all the variables was global. Blame the hoisting.
function getMyValueByCondition(condition) {
// myValue will be declared here and will set to be undefined.
if (condition) {
var myValue = "My Value";
return myValue;
} else {
// myValue will be undefined here.
}
// myValue will be undefined here.
}
Block-level Scope - let
Now, we can create a local variable by ‘let’ keyword!
let enables to block scoping.
Important issues:
⚬ Only one declaration in each scope (or you will get a syntax error).
⚬ Therefore, It is unusual to use let in the global scope.
⚬ Very useful for loops!
Example of using:
let x = 100;
var x = 'String'; // A syntax error will appear
Block-level Scope - const
Similar to ‘let’ keyword, we can declare now on a constants!
The keyword is ‘const’.
Important to note that:
⚬ Constant must be initialized once, and it cannot be changed.
⚬ Constant is a valid only for the current scope! (just like ‘let’).
Example of using:
const PI = 3.1415926536;
PI = 0; // A syntax error will appear
Default parameters allow parameters to be initialized with default values.
That is - the value will be defaulted in a case of:
⚬ No value was passed.
⚬ Undefined was passed.
Default Parameters
function getRoot(number, root = 2) {
return Math.pow(number, 1 / root);
}
// getRoot(49) will be 7.
// getRoot(8,3) will be 2.
Template Strings is a new syntax for the old strings.
It deals with the following problems:
⚬ Supporting in multiline strings has never been before.
⚬ Ability to separate parts of the string for values in variables.
⚬ Transformation of a string into html is not really safe.
Template Strings solve all those issues.
The syntax is very simple, and marked by backticks ( ` ).
Template Strings
let templateString = `Hello
World!`;
We can use substitutions on Template Strings:
Also, we can use tags on Template Strings:
Template Strings - Substitutions & Tags
let degrees = 90;
let templateString = `Conversion of 90 degrees into radians is: ${(degrees * Math.PI) / 180}`;
let printOfResultOnly = function (str, degrees, result) {
// str will be ["Conversion of ", " degrees into radians is:", ""]
return result;
};
templateString = printOfResultOnly`Conversion: ${degrees} degrees into radians is: ${(degrees
* Math.PI) / 180}`;
Classes are a better syntax over the prototype object.
What we will get in the bundle?
⚬ Creation of instances via ‘new’ keyword.
⚬ Encapsulating fields and functions that relevant the class.
⚬ Intuitive constructor is exist.
⚬ Even extend and override a methods!
⚬ Defining of static members.
⚬ Note that we cannot define private members.
Classes
class Animal {
constructor(age = 0) {
this.age = age;
}
eat() {}
}
Example of inheritance:
Classes
class Cat extends Animal {
constructor(age, name) {
super(age);
this.name = name;
}
eat() {
return `I am ${this.name}, and i love milk!`;
}
}
let kitty = new Cat(5, 'Kitty');
Until now, were two main approaches for modules:
⚬ CommonJS - Compact API that designed for synchronized loading.
It focuses in the server side.
Motivation: Simple and clear syntax.
Main Implementations: Node.js, RingoJS.
⚬ Asynchronous Module Definition - More complex API that designed for
asynchronous loading.
It focuses in the client side.
Motivation: Dependency management.
Main Implementation: RequireJS.
Modules
Modules are even more simple than CommonJS together with the
supporting in asynchronous loading of AMD!
There are two new keywords: export and import.
Example of using:
Modules
// math.js
export const PI = Math.PI;
export function square(x) {
return x*x;
}
// app.js
import {PI, square} from 'math'; // Alternatively, could be: import * as math from ‘math’
console.log(square(PI)); // Will be PI^2
Rest parameters is a better alternative to arguments.
The rest parameter is an array that marked by ‘...’ (three points).
All parameters that will be delivered from this location, will be in this array.
Example of using:
Rest Parameters
let myFunction = function(x, ...parametersThatIDontCare) {
// parametersThatIDontCare = [true, 'Cool String']
return x * parametersThatIDontCare.length;
};
myFunction(10, true, 'Cool String'); // Will be 20
Spread operator allows to deliver an array, and separate it to multiple
parameters in the declaration of function.
It should be inverse of rest parameters.
Example of using:
Spread Operator
let myFunction = function(str, x, y, z) {
return str + (x+y+z);
};
myFunction('The sum is:', ...[1, 10, 100]);
Destructuring is way to select a specific arguments from array or object
into variables. Actually, destructuring is matching between two collections
by different patterns.
Example of using:
Destructuring
let [a, , , b] = [1, 3, 5, 9];
console.log('a + b is: ' + (a + b)); // Will be 10
let { one, two, three: [, threeValue] } = {
one: 1,
two: 2,
three: [4, 3]
};
console.log('one + two + three is: ' + (one + two + threeValue)); // Will be 6
let [d, c] = [c, d]; // Swap the values without temp!
Symbol is new primitive type that used as private reference to property.
Symbols are unique!
The file must hold this symbol to access the property of object.
Example of using:
Symbols
var privateProperty = Symbol('Description: Private property');
var object = {};
object[privateProperty] = 'My Private';
console.log(privateProperty); // Is a symbol
console.log(object[privateProperty]); // Will print 'My Private'
Map is dictionary data structure that stores pairs of key and value.
Difference from object, now the key can be an object!
Map provides an API with: set, get, clear, forEach, size, and more!
Example of using:
Maps
let objectKey = {value: 100};
let map = new Map();
map.set('stringKey', 'The value is ');
map.set(objectKey, objectKey.value);
console.log(map.get('stringKey') + map.get(objectKey)); // Will be 'The value is 100'
console.log('Map size: ' + map.size); // Will be 2
Set is data structure of collection of values.
It wraps the old object with better API.
It provides an API with: add, has, clear, forEach, size, and more!
Example of using:
Sets
let mySetList = new Set();
mySetList.add('First').add('Second');
mySetList.add(true);
console.log(mySetList); // Will be {"First", "Second", true}
console.log(mySetList.has('Second')); // Will be true
Along all main features, little changes in numbers were made.
Until now, the methods isFinite and isNaN could get numbers as string:
Now, we have those methods in part of Number,
which will accept only numbers values:
Little changes of Numbers
console.log(isFinite("1")); // Will be true
console.log(isNaN("NaN")); // Will be true
console.log(Number.isFinite("1")); // Will be false
console.log(Number.isNaN("NaN")); // Will be false
Added function to identify if it is an integer!
Added a lot of new Math methods!
For example:
⚬ Math.acosh(x), Math.asinh(x), Math.atanh(x)
⚬ Math.log1p(x), Math.log10(x), Math.log2(x)
⚬ Math.trunc(x)
Little changes of Numbers
console.log(Number.isInteger(25.5)); // Will be false
⚬ Object.observe - Allows to register to changes of data model by
callback (Feature of ES7).
⚬ Promises - Asynchronous operations.
⚬ Generators - Special functions that creates a type of iterators.
⚬ Proxies - Creating a proxy on a particular object allows a predefined
handler to get notified when something happens.
⚬ Array comprehensions - Syntax that allows you to quickly assemble a
new array based on an existing one (Feature of ES7).
⚬ Tail call optimization - Instead of create new stack frames, It reuses old
stack frames.
Unspoken features
⚬ ECMAScript 6 standard of scripting languages.
⚬ ECMAScript 6 will be published on June 2015.
⚬ ECMAScript 6 will bring a lot of changes:
○ Arrows
○ let & const
○ Default parameters, Rest Parameters
○ Spread Operator
○ Template Strings
○ Classes & Modules
○ Destructuring
○ Symbols
○ Maps & Sets
○ Minor changes of Numbers
Conclusions
Questions
?

More Related Content

What's hot

ES6 - Next Generation Javascript
ES6 - Next Generation JavascriptES6 - Next Generation Javascript
ES6 - Next Generation Javascript
Ramesh Nair
 
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMConcurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMMario Fusco
 
Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013
aleks-f
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015
Leonardo Borges
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
Leonardo Borges
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
Mario Fusco
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
Han Lee
 
purely_functional_play_framework_application
purely_functional_play_framework_applicationpurely_functional_play_framework_application
purely_functional_play_framework_application
Naoki Aoyama
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
Christian Baranowski
 
Hidden Gems in Swift
Hidden Gems in SwiftHidden Gems in Swift
Hidden Gems in Swift
Netguru
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
Brian Moschel
 
Introduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in HaskellIntroduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in Haskell
nebuta
 
Javascript Function
Javascript FunctionJavascript Function
Javascript Function
xxbeta
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better Programmer
Mario Fusco
 
EcmaScript 6 - The future is here
EcmaScript 6 - The future is hereEcmaScript 6 - The future is here
EcmaScript 6 - The future is here
Sebastiano Armeli
 
Dynamic C++ Silicon Valley Code Camp 2012
Dynamic C++ Silicon Valley Code Camp 2012Dynamic C++ Silicon Valley Code Camp 2012
Dynamic C++ Silicon Valley Code Camp 2012
aleks-f
 
Academy PRO: ES2015
Academy PRO: ES2015Academy PRO: ES2015
Academy PRO: ES2015
Binary Studio
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! aleks-f
 
C++totural file
C++totural fileC++totural file
C++totural filehalaisumit
 

What's hot (20)

ES6 - Next Generation Javascript
ES6 - Next Generation JavascriptES6 - Next Generation Javascript
ES6 - Next Generation Javascript
 
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMConcurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
 
Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013
 
Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015Futures e abstração - QCon São Paulo 2015
Futures e abstração - QCon São Paulo 2015
 
Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012Continuation Passing Style and Macros in Clojure - Jan 2012
Continuation Passing Style and Macros in Clojure - Jan 2012
 
From object oriented to functional domain modeling
From object oriented to functional domain modelingFrom object oriented to functional domain modeling
From object oriented to functional domain modeling
 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
 
purely_functional_play_framework_application
purely_functional_play_framework_applicationpurely_functional_play_framework_application
purely_functional_play_framework_application
 
SDC - Einführung in Scala
SDC - Einführung in ScalaSDC - Einführung in Scala
SDC - Einführung in Scala
 
Hidden Gems in Swift
Hidden Gems in SwiftHidden Gems in Swift
Hidden Gems in Swift
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Introduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in HaskellIntroduction to ad-3.4, an automatic differentiation library in Haskell
Introduction to ad-3.4, an automatic differentiation library in Haskell
 
Javascript Function
Javascript FunctionJavascript Function
Javascript Function
 
Cpp tutorial
Cpp tutorialCpp tutorial
Cpp tutorial
 
OOP and FP - Become a Better Programmer
OOP and FP - Become a Better ProgrammerOOP and FP - Become a Better Programmer
OOP and FP - Become a Better Programmer
 
EcmaScript 6 - The future is here
EcmaScript 6 - The future is hereEcmaScript 6 - The future is here
EcmaScript 6 - The future is here
 
Dynamic C++ Silicon Valley Code Camp 2012
Dynamic C++ Silicon Valley Code Camp 2012Dynamic C++ Silicon Valley Code Camp 2012
Dynamic C++ Silicon Valley Code Camp 2012
 
Academy PRO: ES2015
Academy PRO: ES2015Academy PRO: ES2015
Academy PRO: ES2015
 
Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! Look Ma, “update DB to HTML5 using C++”, no hands! 
Look Ma, “update DB to HTML5 using C++”, no hands! 
 
C++totural file
C++totural fileC++totural file
C++totural file
 

Viewers also liked

What is New in HTML5?
What is New in HTML5?What is New in HTML5?
What is New in HTML5?
Nitay Neeman
 
Algoritmo selectivo
Algoritmo selectivoAlgoritmo selectivo
Algoritmo selectivo
salerogustavo
 
Mwr twr white-paper
Mwr twr white-paperMwr twr white-paper
Mwr twr white-paperAdarsh Sinha
 
14001 Certificate_Md. Sajjad Hossain Sajib
14001 Certificate_Md. Sajjad Hossain Sajib14001 Certificate_Md. Sajjad Hossain Sajib
14001 Certificate_Md. Sajjad Hossain SajibSajjad Sajib
 
TDC2016SP - Rails Custom Validators - Não se esqueça deles
TDC2016SP - Rails Custom Validators - Não se esqueça delesTDC2016SP - Rails Custom Validators - Não se esqueça deles
TDC2016SP - Rails Custom Validators - Não se esqueça deles
tdc-globalcode
 
Jharkhand Staff Selection Commission notification 2015
Jharkhand Staff Selection Commission notification 2015Jharkhand Staff Selection Commission notification 2015
Jharkhand Staff Selection Commission notification 2015
Raja Kashyap
 
Cinco características para franquiciar una empresa.
Cinco características para franquiciar una empresa.Cinco características para franquiciar una empresa.
Cinco características para franquiciar una empresa.
bomboclank
 
Estructura de un computador
Estructura de un computadorEstructura de un computador
Estructura de un computador
ArroyoEric
 
MAS Decadence Presentation
MAS Decadence PresentationMAS Decadence Presentation
MAS Decadence Presentationlatymermedia
 
Capitulo 3 y 4 del libro blanco de las tic
Capitulo 3 y 4 del libro blanco de las ticCapitulo 3 y 4 del libro blanco de las tic
Capitulo 3 y 4 del libro blanco de las ticUniversidad del QuindÍo
 
Пан Коцький
Пан КоцькийПан Коцький
Пан Коцький
Osya Dubyaga
 
Why do we need TypeScript?
Why do we need TypeScript?Why do we need TypeScript?
Why do we need TypeScript?
Nitay Neeman
 
4 ficha refuerzo 1º eso
4 ficha  refuerzo    1º   eso4 ficha  refuerzo    1º   eso
4 ficha refuerzo 1º eso
Lolicanadilla
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
tdc-globalcode
 
Blogs Empresariales T2
Blogs Empresariales T2Blogs Empresariales T2
Blogs Empresariales T2
Consultores Valencia
 
Ansoff matrix
Ansoff matrixAnsoff matrix
Ansoff matrix
Vikram Gangal
 
McCulley_FinalPaperAlexander
McCulley_FinalPaperAlexanderMcCulley_FinalPaperAlexander
McCulley_FinalPaperAlexanderBrent McCulley
 
Sistema de franquicias
Sistema de franquicias Sistema de franquicias
Sistema de franquicias
Iris Mabel Barrios Bustamante
 

Viewers also liked (19)

What is New in HTML5?
What is New in HTML5?What is New in HTML5?
What is New in HTML5?
 
Algoritmo selectivo
Algoritmo selectivoAlgoritmo selectivo
Algoritmo selectivo
 
Mwr twr white-paper
Mwr twr white-paperMwr twr white-paper
Mwr twr white-paper
 
14001 Certificate_Md. Sajjad Hossain Sajib
14001 Certificate_Md. Sajjad Hossain Sajib14001 Certificate_Md. Sajjad Hossain Sajib
14001 Certificate_Md. Sajjad Hossain Sajib
 
TDC2016SP - Rails Custom Validators - Não se esqueça deles
TDC2016SP - Rails Custom Validators - Não se esqueça delesTDC2016SP - Rails Custom Validators - Não se esqueça deles
TDC2016SP - Rails Custom Validators - Não se esqueça deles
 
Jharkhand Staff Selection Commission notification 2015
Jharkhand Staff Selection Commission notification 2015Jharkhand Staff Selection Commission notification 2015
Jharkhand Staff Selection Commission notification 2015
 
Libro blanco de las tic capitulo 1 y 2
Libro blanco de las tic  capitulo 1 y 2Libro blanco de las tic  capitulo 1 y 2
Libro blanco de las tic capitulo 1 y 2
 
Cinco características para franquiciar una empresa.
Cinco características para franquiciar una empresa.Cinco características para franquiciar una empresa.
Cinco características para franquiciar una empresa.
 
Estructura de un computador
Estructura de un computadorEstructura de un computador
Estructura de un computador
 
MAS Decadence Presentation
MAS Decadence PresentationMAS Decadence Presentation
MAS Decadence Presentation
 
Capitulo 3 y 4 del libro blanco de las tic
Capitulo 3 y 4 del libro blanco de las ticCapitulo 3 y 4 del libro blanco de las tic
Capitulo 3 y 4 del libro blanco de las tic
 
Пан Коцький
Пан КоцькийПан Коцький
Пан Коцький
 
Why do we need TypeScript?
Why do we need TypeScript?Why do we need TypeScript?
Why do we need TypeScript?
 
4 ficha refuerzo 1º eso
4 ficha  refuerzo    1º   eso4 ficha  refuerzo    1º   eso
4 ficha refuerzo 1º eso
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
 
Blogs Empresariales T2
Blogs Empresariales T2Blogs Empresariales T2
Blogs Empresariales T2
 
Ansoff matrix
Ansoff matrixAnsoff matrix
Ansoff matrix
 
McCulley_FinalPaperAlexander
McCulley_FinalPaperAlexanderMcCulley_FinalPaperAlexander
McCulley_FinalPaperAlexander
 
Sistema de franquicias
Sistema de franquicias Sistema de franquicias
Sistema de franquicias
 

Similar to Getting started with ES6

Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
WondimuBantihun1
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
Troy Miles
 
ECMAScript 6 Review
ECMAScript 6 ReviewECMAScript 6 Review
ECMAScript 6 Review
Sperasoft
 
2.overview of c++ ________lecture2
2.overview of c++  ________lecture22.overview of c++  ________lecture2
2.overview of c++ ________lecture2
Warui Maina
 
ECMAScript 2015
ECMAScript 2015ECMAScript 2015
ECMAScript 2015
Sebastian Pederiva
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operatorSAFFI Ud Din Ahmad
 
Object Oriented Programming Using C++: C++ Namespaces.pptx
Object Oriented Programming Using C++: C++ Namespaces.pptxObject Oriented Programming Using C++: C++ Namespaces.pptx
Object Oriented Programming Using C++: C++ Namespaces.pptx
RashidFaridChishti
 
An Introduction to Property Based Testing
An Introduction to Property Based TestingAn Introduction to Property Based Testing
An Introduction to Property Based Testing
C4Media
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
MuhammadTalha436
 
Linked list
Linked listLinked list
Linked list
somuinfo123
 
Svcc Building Rich Applications with Groovy's SwingBuilder
Svcc Building Rich Applications with Groovy's SwingBuilderSvcc Building Rich Applications with Groovy's SwingBuilder
Svcc Building Rich Applications with Groovy's SwingBuilder
Andres Almiray
 
C# 6.0
C# 6.0C# 6.0
C# 6.0
Paul Graham
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
ciklum_ods
 
C++ Course - Lesson 3
C++ Course - Lesson 3C++ Course - Lesson 3
C++ Course - Lesson 3Mohamed Ahmed
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design Patterns
Stefano Fago
 
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
HODZoology3
 
Chapter 2
Chapter 2Chapter 2
Memory Management In C++
Memory Management In C++Memory Management In C++
Memory Management In C++
ShriKant Vashishtha
 
Oops presentation
Oops presentationOops presentation
Oops presentation
sushamaGavarskar1
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 

Similar to Getting started with ES6 (20)

Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
ECMAScript 6 Review
ECMAScript 6 ReviewECMAScript 6 Review
ECMAScript 6 Review
 
2.overview of c++ ________lecture2
2.overview of c++  ________lecture22.overview of c++  ________lecture2
2.overview of c++ ________lecture2
 
ECMAScript 2015
ECMAScript 2015ECMAScript 2015
ECMAScript 2015
 
18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator18 dec pointers and scope resolution operator
18 dec pointers and scope resolution operator
 
Object Oriented Programming Using C++: C++ Namespaces.pptx
Object Oriented Programming Using C++: C++ Namespaces.pptxObject Oriented Programming Using C++: C++ Namespaces.pptx
Object Oriented Programming Using C++: C++ Namespaces.pptx
 
An Introduction to Property Based Testing
An Introduction to Property Based TestingAn Introduction to Property Based Testing
An Introduction to Property Based Testing
 
Object Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ ExamsObject Oriented Solved Practice Programs C++ Exams
Object Oriented Solved Practice Programs C++ Exams
 
Linked list
Linked listLinked list
Linked list
 
Svcc Building Rich Applications with Groovy's SwingBuilder
Svcc Building Rich Applications with Groovy's SwingBuilderSvcc Building Rich Applications with Groovy's SwingBuilder
Svcc Building Rich Applications with Groovy's SwingBuilder
 
C# 6.0
C# 6.0C# 6.0
C# 6.0
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
C++ Course - Lesson 3
C++ Course - Lesson 3C++ Course - Lesson 3
C++ Course - Lesson 3
 
Uncommon Design Patterns
Uncommon Design PatternsUncommon Design Patterns
Uncommon Design Patterns
 
CppTutorial.ppt
CppTutorial.pptCppTutorial.ppt
CppTutorial.ppt
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Memory Management In C++
Memory Management In C++Memory Management In C++
Memory Management In C++
 
Oops presentation
Oops presentationOops presentation
Oops presentation
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
 

Recently uploaded

Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Getting started with ES6

  • 1. ECMAScript 6 Getting Started with ES6 http://goo.gl/OuwX9t Nitay Neeman
  • 2. ⚬ What is ECMAScript 6? ⚬ Brief history ⚬ A lot of new features ⚬ Conclusions We will talk about
  • 3. ECMAScript 6 is new standard of ECMA International. Scheduled to be released on June 2015. The project name is Harmony. What is ES6?
  • 4. ECMAScript is a standard of scripting languages. Actually, it is the syntax. JavaScript is an implementation of standard by specific browsers. There are many others implementations: JScript, ActionScript, Ejscript, Objective-J, Nashorn… All those very similar and depend on the application that executes them. Differences between ES & JS
  • 5. ⚬ 1995 - LiveScript was born by Brendan Eich of Netscape (in 10 days!). In the end of year, the name changed to JavaScript in order to attract Java developers. ⚬ 1996 - Microsoft came and copied JavaScript for supporting of IE. It was called JScript. Meanwhile, JavaScript was delivered to ECMA International in purpose to be a standard of scripting languages. ⚬ 1997 - JavaScript was adopted by ECMA as ECMA-262 standard. ⚬ 1999 - Main version was ECMAScript 3. Until this version, everything was fine... Brief History
  • 6. ⚬ 2000 ~ 2007 - ECMAScript 4 planned to provide a lot of complex features. Microsoft, Yahoo & Google refused and started to develop ECMAScript 3.1. ⚬ 2008 - Brendan Eich was back and announced that Ecma TC39 would focus work on the ECMAScript 3.1. It was decided: 1. ECMAScript 3.1 will rename to ECMAScript 5. 2. ECMAScript 4 will rename to ECMAScript 6. ⚬ 2009 - ECMAScript 5 was published. ⚬ 2015 - ECMAScript 6 will be published. Brief History
  • 7. Cool history, but.. I WANT CODE!
  • 8. A new and short way to create an anonymous function. Arrow function created to be more semantic and readable. Example of using: Important issues: ⚬ It is not newable (will throw an error when you try..) ⚬ It can be used in expressions and in statements. ⚬ Fixed ‘this’ issue! Arrows var square = x => x * x;
  • 9. The following code will not work (‘this’ will be the Window object): Arrows - The meaning of ‘this’ issue var timer = function () { this.seconds = 0; this.printSeconds = function () { console.log(this.seconds); }; setInterval(function () { this.seconds++; // We cannot call to seconds field here this.printSeconds(); // We cannot call to printSeconds here }, 1000); }; var myTimerInstance = new timer();
  • 10. The solution based on arrow function: Arrows - The meaning of ‘this’ issue var fixedTimer = function () { this.seconds = 0; this.printSeconds = () => console.log(this.seconds); setInterval(() => { this.seconds++; this.printSeconds(); }, 1000); }; var myFixedTimerInstance = new fixedTimer();
  • 11. Block-level Scope Until now, all the variables was global. Blame the hoisting. function getMyValueByCondition(condition) { // myValue will be declared here and will set to be undefined. if (condition) { var myValue = "My Value"; return myValue; } else { // myValue will be undefined here. } // myValue will be undefined here. }
  • 12. Block-level Scope - let Now, we can create a local variable by ‘let’ keyword! let enables to block scoping. Important issues: ⚬ Only one declaration in each scope (or you will get a syntax error). ⚬ Therefore, It is unusual to use let in the global scope. ⚬ Very useful for loops! Example of using: let x = 100; var x = 'String'; // A syntax error will appear
  • 13. Block-level Scope - const Similar to ‘let’ keyword, we can declare now on a constants! The keyword is ‘const’. Important to note that: ⚬ Constant must be initialized once, and it cannot be changed. ⚬ Constant is a valid only for the current scope! (just like ‘let’). Example of using: const PI = 3.1415926536; PI = 0; // A syntax error will appear
  • 14. Default parameters allow parameters to be initialized with default values. That is - the value will be defaulted in a case of: ⚬ No value was passed. ⚬ Undefined was passed. Default Parameters function getRoot(number, root = 2) { return Math.pow(number, 1 / root); } // getRoot(49) will be 7. // getRoot(8,3) will be 2.
  • 15. Template Strings is a new syntax for the old strings. It deals with the following problems: ⚬ Supporting in multiline strings has never been before. ⚬ Ability to separate parts of the string for values in variables. ⚬ Transformation of a string into html is not really safe. Template Strings solve all those issues. The syntax is very simple, and marked by backticks ( ` ). Template Strings let templateString = `Hello World!`;
  • 16. We can use substitutions on Template Strings: Also, we can use tags on Template Strings: Template Strings - Substitutions & Tags let degrees = 90; let templateString = `Conversion of 90 degrees into radians is: ${(degrees * Math.PI) / 180}`; let printOfResultOnly = function (str, degrees, result) { // str will be ["Conversion of ", " degrees into radians is:", ""] return result; }; templateString = printOfResultOnly`Conversion: ${degrees} degrees into radians is: ${(degrees * Math.PI) / 180}`;
  • 17. Classes are a better syntax over the prototype object. What we will get in the bundle? ⚬ Creation of instances via ‘new’ keyword. ⚬ Encapsulating fields and functions that relevant the class. ⚬ Intuitive constructor is exist. ⚬ Even extend and override a methods! ⚬ Defining of static members. ⚬ Note that we cannot define private members. Classes class Animal { constructor(age = 0) { this.age = age; } eat() {} }
  • 18. Example of inheritance: Classes class Cat extends Animal { constructor(age, name) { super(age); this.name = name; } eat() { return `I am ${this.name}, and i love milk!`; } } let kitty = new Cat(5, 'Kitty');
  • 19. Until now, were two main approaches for modules: ⚬ CommonJS - Compact API that designed for synchronized loading. It focuses in the server side. Motivation: Simple and clear syntax. Main Implementations: Node.js, RingoJS. ⚬ Asynchronous Module Definition - More complex API that designed for asynchronous loading. It focuses in the client side. Motivation: Dependency management. Main Implementation: RequireJS. Modules
  • 20. Modules are even more simple than CommonJS together with the supporting in asynchronous loading of AMD! There are two new keywords: export and import. Example of using: Modules // math.js export const PI = Math.PI; export function square(x) { return x*x; } // app.js import {PI, square} from 'math'; // Alternatively, could be: import * as math from ‘math’ console.log(square(PI)); // Will be PI^2
  • 21. Rest parameters is a better alternative to arguments. The rest parameter is an array that marked by ‘...’ (three points). All parameters that will be delivered from this location, will be in this array. Example of using: Rest Parameters let myFunction = function(x, ...parametersThatIDontCare) { // parametersThatIDontCare = [true, 'Cool String'] return x * parametersThatIDontCare.length; }; myFunction(10, true, 'Cool String'); // Will be 20
  • 22. Spread operator allows to deliver an array, and separate it to multiple parameters in the declaration of function. It should be inverse of rest parameters. Example of using: Spread Operator let myFunction = function(str, x, y, z) { return str + (x+y+z); }; myFunction('The sum is:', ...[1, 10, 100]);
  • 23. Destructuring is way to select a specific arguments from array or object into variables. Actually, destructuring is matching between two collections by different patterns. Example of using: Destructuring let [a, , , b] = [1, 3, 5, 9]; console.log('a + b is: ' + (a + b)); // Will be 10 let { one, two, three: [, threeValue] } = { one: 1, two: 2, three: [4, 3] }; console.log('one + two + three is: ' + (one + two + threeValue)); // Will be 6 let [d, c] = [c, d]; // Swap the values without temp!
  • 24. Symbol is new primitive type that used as private reference to property. Symbols are unique! The file must hold this symbol to access the property of object. Example of using: Symbols var privateProperty = Symbol('Description: Private property'); var object = {}; object[privateProperty] = 'My Private'; console.log(privateProperty); // Is a symbol console.log(object[privateProperty]); // Will print 'My Private'
  • 25. Map is dictionary data structure that stores pairs of key and value. Difference from object, now the key can be an object! Map provides an API with: set, get, clear, forEach, size, and more! Example of using: Maps let objectKey = {value: 100}; let map = new Map(); map.set('stringKey', 'The value is '); map.set(objectKey, objectKey.value); console.log(map.get('stringKey') + map.get(objectKey)); // Will be 'The value is 100' console.log('Map size: ' + map.size); // Will be 2
  • 26. Set is data structure of collection of values. It wraps the old object with better API. It provides an API with: add, has, clear, forEach, size, and more! Example of using: Sets let mySetList = new Set(); mySetList.add('First').add('Second'); mySetList.add(true); console.log(mySetList); // Will be {"First", "Second", true} console.log(mySetList.has('Second')); // Will be true
  • 27. Along all main features, little changes in numbers were made. Until now, the methods isFinite and isNaN could get numbers as string: Now, we have those methods in part of Number, which will accept only numbers values: Little changes of Numbers console.log(isFinite("1")); // Will be true console.log(isNaN("NaN")); // Will be true console.log(Number.isFinite("1")); // Will be false console.log(Number.isNaN("NaN")); // Will be false
  • 28. Added function to identify if it is an integer! Added a lot of new Math methods! For example: ⚬ Math.acosh(x), Math.asinh(x), Math.atanh(x) ⚬ Math.log1p(x), Math.log10(x), Math.log2(x) ⚬ Math.trunc(x) Little changes of Numbers console.log(Number.isInteger(25.5)); // Will be false
  • 29. ⚬ Object.observe - Allows to register to changes of data model by callback (Feature of ES7). ⚬ Promises - Asynchronous operations. ⚬ Generators - Special functions that creates a type of iterators. ⚬ Proxies - Creating a proxy on a particular object allows a predefined handler to get notified when something happens. ⚬ Array comprehensions - Syntax that allows you to quickly assemble a new array based on an existing one (Feature of ES7). ⚬ Tail call optimization - Instead of create new stack frames, It reuses old stack frames. Unspoken features
  • 30. ⚬ ECMAScript 6 standard of scripting languages. ⚬ ECMAScript 6 will be published on June 2015. ⚬ ECMAScript 6 will bring a lot of changes: ○ Arrows ○ let & const ○ Default parameters, Rest Parameters ○ Spread Operator ○ Template Strings ○ Classes & Modules ○ Destructuring ○ Symbols ○ Maps & Sets ○ Minor changes of Numbers Conclusions