Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Episode 15 - Basics of Javascript

601 views

Published on

Basics of Javascripts for Salesforce Developers

Published in: Education
  • Be the first to comment

  • Be the first to like this

Episode 15 - Basics of Javascript

  1. 1. Path to Code Begin Your Salesforce Coding Adventure
  2. 2. Episode 15 Basics of JavaScript
  3. 3. Jitendra Zaa Salesforce MVP Sr Technical Architect 23x Certified @Jitendra Zaa Speaker
  4. 4. Some House Rules • Please mute your mic • Keep adding questions in Zoom Q&A Window • No question is too small • Questions will be answered in last 15 mins
  5. 5. Agenda • Introduction to JavaScript • Hoisting • var vs let vs const • Different ways to write functions • Arrow Functions • Recursion • Arguments.Callee • Memoization • Promises
  6. 6. History of JavaScript
  7. 7. 1995 • Mocha created by Brendan Eich in 10 days • Renamed to LiveScript Officially • To piggyback popularity of Java, renamed to JavaScript • Worried about Java Trademark, Microsoft released its own version of JavaScript as JScript
  8. 8. 1996 • Worried about future and standardization , Ecma group was introduced to decide feature and capabilities of language • EcmaScript was trademarked by Ecma group to define the standard of JavaScript
  9. 9. Basics of JavaScript
  10. 10. Hoisting
  11. 11. Hoisting The process of assigning variable declarations a default value of undefined during the creation phase is called Hoisting.
  12. 12. Demo 1 Hoisting
  13. 13. Var Var : function scoped undefined when accessing a variable before it’s declared
  14. 14. let let : block scoped ReferenceError when accessing a variable before it’s declared
  15. 15. const const : block scoped ReferenceError when accessing a variable before it’s declared Can’t be reassigned
  16. 16. Demo 2 Different ways to write functions
  17. 17. Demo 3 Sequence of Method matters ?
  18. 18. Demo 4 Recursion
  19. 19. Demo 5 Arguments.Callee
  20. 20. Arrow Functions
  21. 21. Arrow Function var multiplyES5 = function(x, y) { return x * y; }; const multiplyES6 = (x, y) => { return x * y };
  22. 22. Memoization Memoization is programming practice in which returned results from functions are saved in cache, thus boosting the performance of long running / iterative methods.
  23. 23. Demo 6 Memoization and Arrow Methods
  24. 24. Promises Are Asynchronous Has three states 1. Pending 2. Fulfilled 3. Rejected
  25. 25. Reference • Secrets of Javascript by John Resig • Hoisting • Arrow Functions
  26. 26. Q&A
  27. 27. Next Episode 16 Getting Started with Lightning Web Components
  28. 28. Thanks

×