What is ECMAScript?
ECMAScript is the standard specification on which JavaScript is based. It is developed by ECMA International, and the goal is to standardize the language.
ECMAScript 5 (ES5) Details:
| Feature | Description |
|---|---|
| Full Name | ECMAScript 5 (5th Edition) |
| Released Year | December 2009 |
| Standard Number | ECMA-262, 5th Edition |
| Main Goal | Add new features, improve security, and better language support |
Key Features Introduced in ES5:
-
use strictmode -
Arraymethods:forEach(),map(),filter(),reduce() Object.defineProperty()-
JSON.parse()andJSON.stringify() - Better property access control
- Safer coding practices
Example:
javascript
"use strict"; // ES5 feature
var nums = [1, 2, 3];
var doubled = nums.map(function(n) {
return n * 2;
});
console.log(doubled); // [2, 4, 6]
Top comments (0)