ES2015 / ES6
Basics of modern JavaScript
Wojciech Dzikowski
@DzikowskiW
• working remotely for a software startup Folium
Partners since 2011
• we create software for ebook and audiobook
publishers
• Software engineer : JavaScript, PHP (Symfony 2),
Android, OS X / iOS
• contact: @DzikowskiW
Wojciech Dzikowski
Agenda
1. Evolution of JavaScript
2. Main goals of JavaScript and ES6
3. ES6 in practice (selected features)
4. Q&A
Dictionary
• JavaScript (JS) - a high-level, dynamic, untyped, and interpreted
programming language created originally for web browsers, ECMAScript
implementation
• ECMA International - an international non-profit standards organization
for information and communication systems.It acquired its current name in
1994, when the European Computer Manufacturers Association (ECMA)
changed its name to reflect the organization's global reach and activities
• ECMAScript (ES)- scripting-language specification standardized by
Ecma International in ECMA-262 and ISO/IEC 16262. Well-known
implementations of the language, such as JavaScript, JScript and
ActionScript have come into wide use for client-side scripting on the Web
• ES2015 (ES6) - the newest version of ECMAScript
Language Evolution
90s
• 1995: Netscape creates Mocha
• 1995: Mocha -> LiveScript -> JavaScript
• 1996: ECMA adopts JavaScript
• 1997: ECMA-262 (ES1)
• 1998: ES2
• 1999: ES3 (regex, try/catch)
90s
• browser wars IE vs Netscape
• DHTML, “animate everything”
• forms validation
• visitor counters
• code had to be optimised per browser (IE vs Netscape)
2000-2004
• browser wars - IE wins
• not much going on in JS world
2005: AJAX
• Broadband Internet becomes popular
• Asynchronus server requests (AJAX) becomes popular
• renaissance of JavaScript
• countless libraries (mainly helping with AJAX requests
and DOM operations)
2006-2009
• 2008: ECMAScript4 (abandoned)
• 2009: ECMAScript 3.1 5 (strict, JSON, Reflect)
• 2009: servers welcome JavaScript: Node.js
2010-2015
• frameworks evolution, no longer just DOM & AJAX
helpers
• JS packet managers: npm, bower
• solutions for keeping code in modules (node.js,
CommonJS, AMD, Browserify)
• JavaScript preprocessors (Grunt, Gulp, Webpack,…)
Now
• 2015: ECMAScript 2015 (lots of features)
• since 2015 a new ES spec will be released each
year
• upcoming: ES2016 (no major changes)
2016
Web browser
Desktop Apps
Server
Mobile Apps
JavaScript - pros
• easy syntax
• functions are objects (awesome!)
• independent from any big company
• the only native web browser language
• big and vibrant community
• lots of helpful tools, libraries and frameworks
JavaScript
JavaScript ≠ Java
Guinea pig ≠ pig
≠
≠
JavaScript - cons
(subjective list)
• differences in comparison to Java-like
languages can create confusion (prototypes vs
classes,function scope vs block scope, hoisting, +,
…)
JavaScript - cons
(subjective list)
• not many unequivocal clean code practices (each
framework = new practices, enforcing bad
practices can be harmful to community)
• very rapid development often makes tools and
frameworks obsolete fast, it is hard to choose
frameworks and tools for apps that need to be
maintained for years
Main goals of ES6
• fix (some of) ES5 problems
• backwards compatibility (ES5 code is valid in
ES6)
• modern syntax
• better suited for big applications
• new features in standard library
ES6 -today
kangax.github.io/compat-table
ES6 in browsers today
• ES6 => ES5 transpilers
Babel - usage
• command line:
$ babel es6.js -o es5.js
• Online:
• Konfigurator: http://babeljs.io/docs/setup/
Babel - użycie
• Online wizard: http://babeljs.io/docs/setup/
ES6 in practice
ES5: var
ES5: var - hoisting
ES6: let is new var
ES5…
…ES6: const
ES5: concatenation
ES5: long strings
ES6: Template strings
ES6: Object declarations
ES6: Classes
ES6: Classes
ES6: Setters & getters
ES6: Default params
ES5 recap: map
el
ES5 recap: filter
ES5 recap: reduce
ES6: Arrow functions
ES6: Arrow functions
Arrow functions: this
ES5: for … in
• best practice: avoid that loop
ES6: for … of
• for … of can iterate not only over arrays
• Homework: Iterators in ES6
Asynchronus programming
• common in JS (animations, server requests, etc.)
• Classic solution: callback
• Problem: only one callback per async task
Async programming, ES5
• Problem: Nested functions create messy code
Async programming, ES5
• Second try: Listeners
• Problem: no reaction when async function ends before
listener registers, often hard to debug
ES6: Promise
• object that keeps a result of an async function (waiting,
resolved, rejected)
• fixes earlier problem with listeners, since callback is called even
if async function completed the task earlier
• allows to return (Promise) objects and work with them, even if
async function is still not completed (better code readability)
• “promises” that it will get resolved
• uses Observer pattern to populate the result
• flattens nested promises to avoid “callback hell”
Promises
Promise
• waiting
• resolved
• rejected
States:
async function
Listener 1
Listener 2
Listener 3
Promises
Callback hell, ES5
Promises
Modules (ES5)
• IIFE (Immediately Invoked Function Expression)
• controls variable exposure
Modules (ES6) in browser
• use tools such as Browserify / Webpack,
• native ES6 modules are not yet implemented
What we have learned?
• let/const
• template strings
• new ways to declare objects
• classes
• map, filter, reduce (ES5)
• arrow functions
• for … of
• Promises
• Modules
Other ES6 features
• Proxy
• Iterators
• Generators
• Symbols
• Map/Set, WeakMap/WeakSet
• extended standard library (Number, Math, Array)
Summary
• use transpilers (Babel) to write ES6 today for any
browser
• learn ES6 step by step, you don’t have to know
everything at once
• many features are syntactic sugar, use with
moderation
• ES6 is now, go learn it!
What next?
• Babel docs: https://babeljs.io/docs/learn-es2015/
• Mozilla docs: http://developer.mozilla.org/en-US/
docs/Web/JavaScript
• ES specs: https://github.com/tc39/ecma262
• Pluralsight: JavaScript Fundamentals for ES6
• Youtube: FunFunFunction
Q&A

More Related Content

PPTX
Typescript ppt
PDF
The New JavaScript: ES6
PPTX
Modern JS with ES6
PDF
ES6 presentation
PPTX
Understanding react hooks
PPTX
Intro to React
PDF
Nodejs presentation
Typescript ppt
The New JavaScript: ES6
Modern JS with ES6
ES6 presentation
Understanding react hooks
Intro to React
Nodejs presentation

What's hot (20)

PPTX
Understanding REST APIs in 5 Simple Steps
PDF
Introduction into ES6 JavaScript.
PDF
TypeScript Introduction
PDF
What is REST API? REST API Concepts and Examples | Edureka
PPTX
PDF
PPTX
Web forms in ASP.net
PPTX
Files in php
PPTX
REST API Design & Development
PDF
Introducing Async/Await
PPTX
Php.ppt
PPTX
PPTX
jQuery PPT
PPTX
Form Handling using PHP
PDF
REST APIs with Spring
PPT
Php Presentation
PDF
JavaScript Programming
PPTX
Reactjs
PPTX
Spring Boot and REST API
PPTX
Introduction to React JS for beginners
Understanding REST APIs in 5 Simple Steps
Introduction into ES6 JavaScript.
TypeScript Introduction
What is REST API? REST API Concepts and Examples | Edureka
Web forms in ASP.net
Files in php
REST API Design & Development
Introducing Async/Await
Php.ppt
jQuery PPT
Form Handling using PHP
REST APIs with Spring
Php Presentation
JavaScript Programming
Reactjs
Spring Boot and REST API
Introduction to React JS for beginners
Ad

Viewers also liked (6)

PDF
ES6 in Production [JSConfUY2015]
PDF
Lecture 3 - ES6 Script Advanced for React-Native
PDF
ES2015 (ES6) Overview
PDF
ES6: The Awesome Parts
PDF
객체지향 철학 그리고 5대 개념
PDF
객체지향 개념 (쫌 아는체 하기)
ES6 in Production [JSConfUY2015]
Lecture 3 - ES6 Script Advanced for React-Native
ES2015 (ES6) Overview
ES6: The Awesome Parts
객체지향 철학 그리고 5대 개념
객체지향 개념 (쫌 아는체 하기)
Ad

Similar to ES2015 / ES6: Basics of modern Javascript (20)

PPTX
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
PPTX
ES6 - JavaCro 2016
PDF
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
PDF
Making ES6 available to all with ChakraCore and Typescript
PDF
Making ES6 available to all with ChakraCore
PDF
The Present and Future of JavaScript: ES2015 and Beyond
PDF
ES6, A Look Into Your Future
PDF
The ES6 Conundrum - All Things Open 2015
PPTX
Intro to ES6 and why should you bother !
PDF
The Future is Here: ECMAScript 6 in the Wild
PDF
Ecma6 in the wild
PDF
Ecma6 in the wild
PDF
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
PPTX
JS awesomeness or how will ES6 help me build better apps ?
PDF
What's New in ES6 for Web Devs
PDF
slides-students-C03.pdf
PPTX
Using JavaScript ES2015 (ES6), ES2016, ES2017 in production
PDF
2017-web-development-readthedocs-io-en-latest.pdf
PPTX
Introduction to Ecmascript - ES6
PPTX
ECMAScript 2015: my favourite parts
Javantura v3 - ES6 – Future Is Now – Nenad Pečanac
ES6 - JavaCro 2016
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Making ES6 available to all with ChakraCore and Typescript
Making ES6 available to all with ChakraCore
The Present and Future of JavaScript: ES2015 and Beyond
ES6, A Look Into Your Future
The ES6 Conundrum - All Things Open 2015
Intro to ES6 and why should you bother !
The Future is Here: ECMAScript 6 in the Wild
Ecma6 in the wild
Ecma6 in the wild
ECMAScript 6 from an Attacker's Perspective - Breaking Frameworks, Sandboxes,...
JS awesomeness or how will ES6 help me build better apps ?
What's New in ES6 for Web Devs
slides-students-C03.pdf
Using JavaScript ES2015 (ES6), ES2016, ES2017 in production
2017-web-development-readthedocs-io-en-latest.pdf
Introduction to Ecmascript - ES6
ECMAScript 2015: my favourite parts

Recently uploaded (20)

PDF
MaterialX Virtual Town Hall - August 2025
PDF
OpenTimelineIO Virtual Town Hall - August 2025
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PDF
IObit Driver Booster Pro Crack Latest Version Download
PPT
chapter01_java_programming_object_oriented
PPTX
Beige and Black Minimalist Project Deck Presentation (1).pptx
PDF
Difference Between Website and Web Application.pdf
PDF
SBOM Document Quality Guide - OpenChain SBOM Study Group
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PPTX
Relevance Tuning with Genetic Algorithms
PPTX
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
PPTX
UNIT II: Software design, software .pptx
PDF
IDM Crack Activation Key 2025 Free Download
PDF
4K Video Downloader Crack + License Key 2025
PDF
OpenEXR Virtual Town Hall - August 2025
PPTX
Presentation - Summer Internship at Samatrix.io_template_2.pptx
PDF
solman-7.0-ehp1-sp21-incident-management
PPTX
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
PDF
IT Advisory Services | Alphavima Technologies – Microsoft Partner
PDF
C language slides for c programming book by ANSI
MaterialX Virtual Town Hall - August 2025
OpenTimelineIO Virtual Town Hall - August 2025
ESDS_SAP Application Cloud Offerings.pptx
IObit Driver Booster Pro Crack Latest Version Download
chapter01_java_programming_object_oriented
Beige and Black Minimalist Project Deck Presentation (1).pptx
Difference Between Website and Web Application.pdf
SBOM Document Quality Guide - OpenChain SBOM Study Group
Comprehensive Guide to Digital Image Processing Concepts and Applications
Relevance Tuning with Genetic Algorithms
TRAVEL SUPPLIER API INTEGRATION | XML BOOKING ENGINE
UNIT II: Software design, software .pptx
IDM Crack Activation Key 2025 Free Download
4K Video Downloader Crack + License Key 2025
OpenEXR Virtual Town Hall - August 2025
Presentation - Summer Internship at Samatrix.io_template_2.pptx
solman-7.0-ehp1-sp21-incident-management
Phoenix Marketo User Group: Building Nurtures that Work for Your Audience. An...
IT Advisory Services | Alphavima Technologies – Microsoft Partner
C language slides for c programming book by ANSI

ES2015 / ES6: Basics of modern Javascript

  • 1. ES2015 / ES6 Basics of modern JavaScript Wojciech Dzikowski @DzikowskiW
  • 2. • working remotely for a software startup Folium Partners since 2011 • we create software for ebook and audiobook publishers • Software engineer : JavaScript, PHP (Symfony 2), Android, OS X / iOS • contact: @DzikowskiW Wojciech Dzikowski
  • 3. Agenda 1. Evolution of JavaScript 2. Main goals of JavaScript and ES6 3. ES6 in practice (selected features) 4. Q&A
  • 4. Dictionary • JavaScript (JS) - a high-level, dynamic, untyped, and interpreted programming language created originally for web browsers, ECMAScript implementation • ECMA International - an international non-profit standards organization for information and communication systems.It acquired its current name in 1994, when the European Computer Manufacturers Association (ECMA) changed its name to reflect the organization's global reach and activities • ECMAScript (ES)- scripting-language specification standardized by Ecma International in ECMA-262 and ISO/IEC 16262. Well-known implementations of the language, such as JavaScript, JScript and ActionScript have come into wide use for client-side scripting on the Web • ES2015 (ES6) - the newest version of ECMAScript
  • 6. 90s • 1995: Netscape creates Mocha • 1995: Mocha -> LiveScript -> JavaScript • 1996: ECMA adopts JavaScript • 1997: ECMA-262 (ES1) • 1998: ES2 • 1999: ES3 (regex, try/catch)
  • 7. 90s • browser wars IE vs Netscape • DHTML, “animate everything” • forms validation • visitor counters • code had to be optimised per browser (IE vs Netscape)
  • 8. 2000-2004 • browser wars - IE wins • not much going on in JS world
  • 9. 2005: AJAX • Broadband Internet becomes popular • Asynchronus server requests (AJAX) becomes popular • renaissance of JavaScript • countless libraries (mainly helping with AJAX requests and DOM operations)
  • 10. 2006-2009 • 2008: ECMAScript4 (abandoned) • 2009: ECMAScript 3.1 5 (strict, JSON, Reflect) • 2009: servers welcome JavaScript: Node.js
  • 11. 2010-2015 • frameworks evolution, no longer just DOM & AJAX helpers • JS packet managers: npm, bower • solutions for keeping code in modules (node.js, CommonJS, AMD, Browserify) • JavaScript preprocessors (Grunt, Gulp, Webpack,…)
  • 12. Now • 2015: ECMAScript 2015 (lots of features) • since 2015 a new ES spec will be released each year • upcoming: ES2016 (no major changes)
  • 14. JavaScript - pros • easy syntax • functions are objects (awesome!) • independent from any big company • the only native web browser language • big and vibrant community • lots of helpful tools, libraries and frameworks
  • 16. JavaScript ≠ Java Guinea pig ≠ pig ≠ ≠
  • 17. JavaScript - cons (subjective list) • differences in comparison to Java-like languages can create confusion (prototypes vs classes,function scope vs block scope, hoisting, +, …)
  • 18. JavaScript - cons (subjective list) • not many unequivocal clean code practices (each framework = new practices, enforcing bad practices can be harmful to community) • very rapid development often makes tools and frameworks obsolete fast, it is hard to choose frameworks and tools for apps that need to be maintained for years
  • 19. Main goals of ES6 • fix (some of) ES5 problems • backwards compatibility (ES5 code is valid in ES6) • modern syntax • better suited for big applications • new features in standard library
  • 21. ES6 in browsers today • ES6 => ES5 transpilers
  • 22. Babel - usage • command line: $ babel es6.js -o es5.js • Online: • Konfigurator: http://babeljs.io/docs/setup/
  • 23. Babel - użycie • Online wizard: http://babeljs.io/docs/setup/
  • 26. ES5: var - hoisting
  • 27. ES6: let is new var
  • 36. ES6: Setters & getters
  • 44. ES5: for … in • best practice: avoid that loop
  • 45. ES6: for … of • for … of can iterate not only over arrays • Homework: Iterators in ES6
  • 46. Asynchronus programming • common in JS (animations, server requests, etc.) • Classic solution: callback • Problem: only one callback per async task
  • 47. Async programming, ES5 • Problem: Nested functions create messy code
  • 48. Async programming, ES5 • Second try: Listeners • Problem: no reaction when async function ends before listener registers, often hard to debug
  • 49. ES6: Promise • object that keeps a result of an async function (waiting, resolved, rejected) • fixes earlier problem with listeners, since callback is called even if async function completed the task earlier • allows to return (Promise) objects and work with them, even if async function is still not completed (better code readability) • “promises” that it will get resolved • uses Observer pattern to populate the result • flattens nested promises to avoid “callback hell”
  • 50. Promises Promise • waiting • resolved • rejected States: async function Listener 1 Listener 2 Listener 3
  • 54. Modules (ES5) • IIFE (Immediately Invoked Function Expression) • controls variable exposure
  • 55. Modules (ES6) in browser • use tools such as Browserify / Webpack, • native ES6 modules are not yet implemented
  • 56. What we have learned? • let/const • template strings • new ways to declare objects • classes • map, filter, reduce (ES5) • arrow functions • for … of • Promises • Modules
  • 57. Other ES6 features • Proxy • Iterators • Generators • Symbols • Map/Set, WeakMap/WeakSet • extended standard library (Number, Math, Array)
  • 58. Summary • use transpilers (Babel) to write ES6 today for any browser • learn ES6 step by step, you don’t have to know everything at once • many features are syntactic sugar, use with moderation • ES6 is now, go learn it!
  • 59. What next? • Babel docs: https://babeljs.io/docs/learn-es2015/ • Mozilla docs: http://developer.mozilla.org/en-US/ docs/Web/JavaScript • ES specs: https://github.com/tc39/ecma262 • Pluralsight: JavaScript Fundamentals for ES6 • Youtube: FunFunFunction
  • 60. Q&A