0% found this document useful (0 votes)
7 views10 pages

Overview of ECMAScript Features

ECMAScript is a standard defining the core features of JavaScript, established by the European Computer Manufacturers Association in 1999. It was created to unify the various versions of JavaScript used by different browsers, leading to a common standard for scripting languages. The document highlights the evolution of ECMAScript versions, particularly the significant enhancements introduced in ECMAScript 6, such as block-scoped variables, arrow functions, and numerous new features.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views10 pages

Overview of ECMAScript Features

ECMAScript is a standard defining the core features of JavaScript, established by the European Computer Manufacturers Association in 1999. It was created to unify the various versions of JavaScript used by different browsers, leading to a common standard for scripting languages. The document highlights the evolution of ECMAScript versions, particularly the significant enhancements introduced in ECMAScript 6, such as block-scoped variables, arrow functions, and numerous new features.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

ECMA Script

Ravinder

20th Jan 2025


ECMAScript
What is ECMAScript

• European Computer Manufacturers Association

• The JavaScript core language features are defined in a


standard called ECMA(Published in 1999)

• The language defined in this standard is called ECMAScript.

• JavaScript in Browsers is Superset of ECMAScript.

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 2
ECMAScript
Little JavaScript History

• JavaScript was created by Brendan Eich at Netscape.

• In 1995 JavaScript was released.

• It was named as Mocha and LiveScript

• To promote it due to popularity of Java, they named JavaScript

• But here came a twist, IE (JScript)

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 3
ECMAScript
Why we need ECMAScript

• Initially every browser use its own version of JavaScript, which


creates a problem
• JavaScript for Netscape, JScript for IE
• So, JavaScript was taken to ECMA(Organization)
• Now ECMA defined specification to scripting languages.
• To have common standard between browser for javaScript.
• To make the code Uniform throughout the different browsers.

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 4
ECMAScript
ECMA-Versions

• In 1997 ECMAScript1 was released

• 2009 ECMAScript5

• 2015 ECMAScript6 (Major change and have great functionality)

• 2016 ECMAScript7

• 2017 ECMAScript8

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 5
ECMAScript
ECMAScript 6

• Lots of new Features.

• let, const

• Arrow Functions

• Classes.

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 6
ECMAScript
Let and Const: Block-Scoped Variables
While using ES5 before the evolution to ES6, JavaScript
developers had only one way of declaring their variables
and that was using the var keyword; however, it had its
vices which included variable hoisting and scope leakage.
ES6 introduced let and const to address these issues. ES6
features:
function testScope() {
if (true) {
let x = 10; // Block-scoped
const y = 20; // Also block-scoped
[Link](x, y); // Outputs: 10, 20
}
// Uncommenting the next line will throw an error because x and y are block-scoped
// [Link](x, y);
}

testScope();

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 7
ECMAScript
Arrow Functions: Concise Syntax for Functions

Arrow functions - an es6 feature is used to relieve code


of redundancy and make it more concise, and arrow
functions are one way to write better code. They are most
important for callbacks and for one-liners.
// Traditional function
const square = function(x) {
return x * x;
};

// Arrow function
const squareArrow = (x) => x * x;

[Link](square(5)); // Outputs: 25
[Link](squareArrow(5)); // Outputs: 25

© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 8
ECMAScript
New Features in ES6
•enhanced object literals
•template strings
•destructuring
•default + rest + spread
•let + const
•iterators + for..of
•generators
•unicode
•modules
•module loaders
•map + set + weakmap + weakset
•proxies
•symbols
•subclassable built-ins
•promises
•math + number + string + array + object APIs
•binary and octal literals
•reflect api
•tail calls
© Hitachi Digital Services 2023. All Rights Reserved CONFIDENTIAL – For use by Hitachi Vantara employees and other audiences under NDA only. 9
Thank you

You might also like