JavaScript: The Tricky Bits

JavaScript: The Tricky Bits

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 1h 57m | 342 MB

“This code works, but there must be a simpler way.” JavaScript hides lots of power behind techniques with approaches or even names that are not obvious. Developers who want to create more streamlined code with JavaScript’s less visible—and often more powerful—options may need some extra information. In this course, web designer, author, and trainer Joe Chellman highlights hard-to-find techniques that can make a huge difference in how you use JavaScript. After explaining why even experienced developers may still find JavaScript tricky, Joe jumps right into alternatives to speed up loops and process arrays with loops more elegantly. He clears up some confusion around objects, binding, and more. Joe concludes with some sound advice on functions, including how to pass extra named parameters, how to get a function signature to accept arrays, and how to determine which parameters come first more efficiently.

Table of Contents

Introduction
1 JavaScript can get tricky
2 What you should know
3 Using the exercise files

1. Improving on Loops
4 Pain point Sequential for loops become tedious
5 Solution Three alternatives
6 Pain point Processing arrays with loops is inelegant
7 Solution filter(), map(), and reduce()
8 Challenge Iterate differently
9 Solution Iterate differently

2. Objects Can Confuse
10 Pain point Copied objects are not actually copies
11 Solution JSON.stringify() and JSON.parse()
12 Pain point The value of this, like, and always
13 Solution bind()
14 ES6+ solution Arrow functions
15 Challenge Objects of hazard
16 Solution Objects of hazard

3. Oh Functions, My Functions
17 Pain point Send extra parameters to an event handler
18 Solution bind() again
19 Pain point Function signature doesn’t accept arrays
20 Solution Function.prototype.apply()
21 Pain point Refactoring function signatures
22 Solution Objects for arguments
23 Challenge Story generator
24 Solution overview Story generator
25 Solution walkthrough Story generator

Conclusion
26 Next steps and thank you

Homepage