![]() The larger amount in a solution is called the solvent, and substances in lesser amounts are solutes. Sorry, those are the only ways you can support me for now.A solution is made up of a solvent and a solute. This means there's no way for me to set up GitHub Sponsors, OpenCollective, or services relied on them. ⚠️ Note: I live in Ukraine and services like PayPal and Stripe don't work with Ukrainian bank accounts. Your donation is gonna make a clear statement: My work is valued. If you do, please, consider supporting me □.Įvery single donation is important. Hi! I work on this project in my spare time, in addition to my primary job. Zeros in JavaScript - a comparison table of =, =, + and * in JavaScript.He wants to help you produce cleaner, more elegant, more readable code, then inspire people to contribute to the open source community. JavaScript? - Kyle Simpsons talk for Forward 2 attempts to “pull out the crazy” from JavaScript. Wat - A lightning talk by Gary Bernhardt from CodeMash 2012.- a collection of those very special irregularities, inconsistencies and just plain painfully unintuitive moments for the language of the web.See for reference NOTE 2 on the ECMA-262 definition for toFixed. IE11, however, will report the value input with only zeros appended to the end even in the toFixed(20) case, as it seems to be forcibly rounding the value to reduce the troubles from hardware limits. Rounding it at any reasonable length will render it as a 5. In this case, that "5" on the end was actually an extremely tiny fraction below a true 5. toFixed ( 20 ) // -> 0.78749999999999997780įloating point numbers are not stored as a list of decimal digits internally, but through a more complicated methodology that produces tiny inaccuracies that are usually rounded away by toString and similar calls, but are actually present internally. toFixed ( 3 ) // -> 0.787 // It looks like it's just a 5 when you expand to the // limits of 64-bit (double-precision) float accuracy ( 0.7875 ). ![]() Confirm the odd result of rounding a 5 down ( 0.7875 ). However, when we pass undefined, we will get NaN. The value undefined is assigned to formal arguments when there are no actual arguments, so you might expect that Number without arguments takes undefined as a value of its parameter. If we don't pass any arguments into the Number constructor, we'll get 0. You should watch very carefully for the above examples! The behaviour is described in section 7.2.15 Abstract Equality Comparison of the specification. -> is used to show the result of an expression. ⚠️ Note: If you enjoy reading this document, please, consider supporting the author of this collection. You're probably going to find something new. If you are a professional developer, you can consider these examples as a great reference for all of the quirks and unexpected edges of our beloved JavaScript. I hope these notes will motivate you to spend more time reading the specification. If you are a beginner, you can use these notes to get a deeper dive into JavaScript. Just because it's fun to learn something that we didn't know before. The primary goal of this list is to collect some crazy examples and explain how they work, if possible. “Just for Fun: The Story of an Accidental Revolutionary”, Linus Torvalds Non-strict comparison of a number to true.resolve() won't return Promise instance.Number.toFixed() display different numbers.Accessing object properties with arrays.Arrow functions can not be a constructor.document.all is an object, but it is undefined.true is not equal !, but not equal too.They may not contain every example, and existing examples may be outdated. Note: Translations are maintained by their translators. The source is available here: TranslationsĬurrently, there are these translations of wtfjs: Otherwise, you may continue reading on here. This will open the manual in your selected $PAGER. ![]() You should be able to run wtfjs at the command line now.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |