Ecma script 5

588 views
531 views

Published on

Demo code https://github.com/AlexanderTarasyuk/ECMAScript5

Published in: Technology, Spiritual
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
588
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Ecma script 5

  1. 1. The Future of JavaScript (ECMAScript-5) Alexander Tarasyuk
  2. 2. Array <ul><ul><li>indexOf() </li></ul></ul><ul><ul><li>lastIndexOf() </li></ul></ul><ul><ul><li>every() </li></ul></ul><ul><ul><li>filter() </li></ul></ul><ul><ul><li>forEach() </li></ul></ul><ul><ul><li>map() </li></ul></ul><ul><ul><li>some() </li></ul></ul><ul><ul><li>isArray() </li></ul></ul><ul><ul><li>reduce() </li></ul></ul><ul><ul><li>reduceRight() </li></ul></ul>2
  3. 3. indexOf 3
  4. 4. lastIndexOf 4
  5. 5. every 5
  6. 6. filter 6
  7. 7. forEach 7
  8. 8. map 8
  9. 9. some 9
  10. 10. isArray 10
  11. 11. reduce 11
  12. 12. reduceRight 12
  13. 13. String <ul><ul><li>trim() </li></ul></ul>13
  14. 14. Date <ul><ul><li>now() </li></ul></ul><ul><ul><li>toISOString() </li></ul></ul>14
  15. 15. toISOString 15
  16. 16. Object <ul><ul><li>create() </li></ul></ul><ul><ul><li>defineProperty() </li></ul></ul><ul><ul><li>defineProperties() </li></ul></ul><ul><ul><li>keys() </li></ul></ul><ul><ul><li>getOwnPropertyDescriptor() </li></ul></ul><ul><ul><li>getOwnPropertyNames() </li></ul></ul><ul><ul><li>getPrototypeOf() </li></ul></ul><ul><ul><li>seal() </li></ul></ul><ul><ul><li>isSealed() </li></ul></ul><ul><ul><li>freeze() </li></ul></ul><ul><ul><li>isFrozen() </li></ul></ul><ul><ul><li>preventExtensions() </li></ul></ul><ul><ul><li>isExtensible() </li></ul></ul>16
  17. 17. create 17
  18. 18. 18 Inheritance
  19. 19. 19 defineProperty
  20. 20. 20 writable, configurable, enumerable
  21. 21. 21 getters / setters
  22. 22. 22 keys
  23. 23. 23 getOwnPropertyNames
  24. 24. 24 getOwnPropertyDescriptor
  25. 25. 25 getPrototypeOf
  26. 26. 26 seal, isSealed
  27. 27. 27 freeze, isFrozen
  28. 28. 28 preventExtensions, isExtensible
  29. 29. JSON <ul><ul><li>parse() </li></ul></ul><ul><ul><li>stringify() </li></ul></ul>29
  30. 30. parse 30
  31. 31. stringify 31
  32. 32. Function <ul><ul><li>bind() </li></ul></ul>32
  33. 33. 33 bind
  34. 34. Strict Mode <ul><ul><li>eval('&quot;010&quot;')-  is a SyntaxError </li></ul></ul><ul><ul><li>eval('010')-  is a SyntaxError </li></ul></ul><ul><ul><li>__i_dont_exist = 1;  - is a ReferenceError </li></ul></ul><ul><ul><li>eval = 1; -  is a SyntaxError </li></ul></ul><ul><ul><li>arguments = 1; -  is a SyntaxError </li></ul></ul><ul><ul><li>eval++; -  is a SyntaxError </li></ul></ul><ul><ul><li>arguments++; -  is a SyntaxError </li></ul></ul><ul><ul><li>arguments.caller; -  is a TypeError </li></ul></ul><ul><ul><li>(function(x){ x = 2; return arguments[0] === 1; })(1); </li></ul></ul><ul><ul><li>(function(x){ arguments[0] = 2; return x === 1; })(1); </li></ul></ul><ul><ul><li>({ x: 1, x: 1 }); -  is a SyntaxError </li></ul></ul><ul><ul><li>({ set x(eval){ } }); -  is a SyntaxError </li></ul></ul><ul><ul><li>({ set x(arguments){ } }); -  is a SyntaxError </li></ul></ul><ul><ul><li>eval('var x'); x; -  is a ReferenceError </li></ul></ul><ul><ul><li>(function(){ return this === undefined; })(); </li></ul></ul><ul><ul><li>(function(){ return this === undefined; }).call(); </li></ul></ul><ul><ul><li>var x; delete x; -  is a SyntaxError </li></ul></ul><ul><ul><li>delete (function(){}).length; -  is a TypeError </li></ul></ul><ul><ul><li>(function f() { f = 123; })() -  is a TypeError </li></ul></ul><ul><ul><li>Object.defineProperty({ }, &quot;x&quot;, { writable: false }).x = 1 </li></ul></ul><ul><ul><li>....... </li></ul></ul>34
  35. 35. Compatibility table 35
  36. 36. ECMASCript-6 <ul><ul><li>let </li></ul></ul><ul><ul><li>function main(a = 1) {}  </li></ul></ul><ul><ul><li>const </li></ul></ul><ul><ul><li>Proxy Objects </li></ul></ul><ul><ul><li>module </li></ul></ul><ul><ul><li>import </li></ul></ul><ul><ul><li>yield </li></ul></ul><ul><ul><li>...... </li></ul></ul>36
  37. 37. Thank You

×