clean-code-javascript
clean-code-javascript copied to clipboard
:bathtub: Clean Code concepts adapted for JavaScript
> Destructuring also clones the specified primitive values of the argument object passed into the function. This can help prevent side effects. Note: objects and arrays that are destructured from...
- Encapsulate conditionals - Avoid negative conditionals Great guide by the way!
This was not covered in the book and you did not explain how the concepts in the book apply to this use case. I think using promise chaining is cleaner...
Hello I would like to know if I can translate it to Spanish but in Gitbook
#Avoid conditionals# ` BAD class Airplane { // ... getCruisingAltitude() { switch (this.type) { case "777": return this.getMaxAltitude() - this.getPassengerCount(); case "Air Force One": return this.getMaxAltitude(); case "Cessna": return this.getMaxAltitude()...
Just found this resource and I LOVE the idea/execution. However the first thing that immediately struck me is that these are written like oracular commandments. Would it not be nice...
As stated in the description: "The best explanation for this is if you have a parent class and a child class, then the base class and child class can be...
Yes, this is very clean code, but causes trouble when default properties need to be calculated, and this writing is a bit counterintuitive.Thank you very much if you can give...
I found the following [example ](https://github.com/ryanmcdermott/clean-code-javascript)hard to understand. Especially on this part: ```js const [, city, zipCode] = address.match(cityZipCodeRegex) || []; ``` It might be a valuable addition to simplify...
It says there is good resources and the first title on the landing page says that those practices are bad and should not be used any more. Maybe find something...