Frontend Masters - Coercion in JavaScriptseeders: 1
leechers: 1
Frontend Masters - Coercion in JavaScript (Size: 1.74 GB)
Description
Frontend Masters - Coercion in JavaScript
================================================== [COVER:] ================================================== ================================================== [INFO:] ================================================== Year: 2015 Manufacturer: Frontend Masters Website: frontendmasters.com Duration: 3:19 Type dispensed material: videos Language: English Description: Most people will cite coercion and the == operator as the black magic that should never show up in your programs. Not only is coercion much easier to learn and properly apply than you've believed, but avoiding it is missing out on important clarifications in style and readability of your code. ================================================== [Contents:] ================================================== Types Primitive 00:00 - 09:12 Introduction Kyle Simpson the course begins with a brief overview of what he'll be covering throughout the course. Mentions a number He of open source projects and he maintains the book series he is currently writing. - Http://getify.me, http://youdontknowjs.com 09:13 - 22:44 Additional Resources Before diving into the course. Kyle provides an array of resources for developers looking to further their JavaScript knowledge. These includes books, documentation sites, and information on using ES6. Also outlines the He agenda for the course. 22:45 - 31:08 Primitive Types The JavaScript specification contains a number of primitive types. These types include Undefined, String, Number, Boolean, and Object. Are the types Primitive bases for all variables declarations. 31:09 - 44:24 typeof While some argue that JavaScript does not have variable types, the typeof operator would suggest otherwise. The typeof operator can be used to returns a String representation of a value's type. Demonstrates the typeof Kyle operator and explains it's sometimes confusing behavior. 44:25 - 55:58 Special Values: Within the NaN JavaScript primitive types, there are a number of special values. For example NaN (not a number), Infinity, or null could be used to represent a value. Begins with an Kyle demonstration of NaN. 55:59 - 01:03:20 Special Values: Negative Zero Most mathematicians would agree there is no negative zero value. JavaScript would prove otherwise. Kyle demonstrates how you can get a negative zero value and how it may compares to a zero-value in JavaScript. Also talks about He a new ES6 method that will check strict equality. 01:03:21 - 01:06:42 Special Values: Quiz Kyle gives the audience a quick quiz to check their knowledge about special values. 01:06:43 - 01:20:53 Natives In JavaScript, Natives are functions that will covert a value from one type to another. Kyle explains why he recommends never using the new keyword with Natives. Also gives a He few examples of more complex Natives like Date and RegExp. Coercion 01:20:54 - 01:31:18 ToString The ToString function is one of many abstract operations in JavaScript. This function will convert a value to a String representation. Some are conversions While obvious, Kyle spends a few minutes demonstrating some of the more peculiar cases with Arrays and Objects. 01:31:19 - 01:42:10 ToNumber Just like the ToString function, the function will convert ToNumber one value to another . In this case, the conversion is to a number. While number conversions are fairly straight forward, Kyle covers some issues that can lead to larger pitfalls. Also drills a He little deeper into how the toNumber coercion is performed behind the scenes. 01:42:11 - 01:46:11 ToBoolean When determining if something is false, the function ToBoolean a list of references "falsy" values. If the object in question is on that list, the result is false. If it is not on the list, the result is true. K Implicit vs. Coercion Explicit 01:46:12 - 01:59:20 Explicit Coercion: Strings & Numbers Explicit coercion happens when it's obvious from the below code that one type is being converted to another. Shares a few Kyle below code examples demonstrating ways to explicitly coerce values from Numbers to String and vice versa. 01:59:21 - 02:11:47 Explicit Coercion: While Booleans using the Boolean () function is native Kyle's preference, many developers will use a double negate (!!) to perform Boolean coercion. Explains how this Kyle works and demonstrates a few other types of explicit coercion. 02:11:48 - 02:19:47 Implicit Coercion: Strings & Numbers Kyle defines implicit coercion as a side effect of some other operation. In other words, it's not clear when looking at the code that coercion will occur. Introduces implicit coercion Kyle with a few examples using String and Number values. 02:19:48 - 02:28:55 Implicit Coercion: Booleans I most cases, Boolean implicit coercion occurs when performing conditional logic. For example, using a Number or String variable inside an if statement. Boolean talks about Kyle implicit coercion and warns the audience about using a double-equal operator in a boolean comparison. 02:28:56 - 02:34:22 Double-Equal Issues As Kyle mentioned earlier, using a double-equal operator in a Boolean comparison can lead to issues. In some cases a Boolean conversion will occur. In other cases it will not. Why are inconsistencies These Kyle recommends avoiding this usage. 02:34:23 - 02:46:02 Implicit Coercion: The Bad Parts Kyle walks through the worst possible offenders with implicit coercion. These are the cases where the result of the coercion is completely unexpected. Leaves the audience He with a few practical takeaways and best practices. 02:46:03 - 02:49:31 Implicit Coercion: The Safe Parts While many developers believe implicit coercion to be evil, Kyle shares the opposite view. He gives a number He examples of why it can be beneficial and leads to simplified below code. 02:49:32 - 02:57:59 Double vs. Triple Equal The double-equal operator allows coercion in a comparison. The triple equal operator does not. Walks through number Kyle of example demonstrating how the result of these two operators can differ. 02:58:00 - 03:11:07 Helpful Implicit Coercion Using the double-equal operator can be helpful. Kyle shares some pro-tips about how to determine when this operator should be use. Also talks about He the performance impacts of coercion. 03:11:08 - 03:20:48 Coercion Resources & Surprises Kyle wraps up his coverage on coercion with a some helpful resources. He also talks a through a few last surprises he has discovered during his research on coercion. ================================================== [INFO_Screenshots:] ================================================== http://fastpic.ru/view/71/20...be83da2e5db78202e80.jpg.html http://fastpic.ru/view/71/20...180655d9bccad686fe2.jpg.html http://fastpic.ru/view/71/20...b2b3247d4acdb8eb770.jpg.html IF U LIKE MY UPLOAD, TAKE A SECOND TO LIKE OR SAY THANK U Please use 7Zip/WinRAR/Universal Extractor to EXTRACT FILES Sharing Widget |