From 753d6d8b33dece69e08b2ec0ea0807592881fbf2 Mon Sep 17 00:00:00 2001 From: James Tharpe Date: Mon, 29 Mar 2021 08:38:27 -0400 Subject: [PATCH 1/5] Make example more succinct "PER" has the same meaning as "IN_A" but is less verbose --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ad21e9aa..71896ed4 100644 --- a/README.md +++ b/README.md @@ -100,9 +100,9 @@ setTimeout(blastOff, 86400000); ```javascript // Declare them as capitalized named constants. -const MILLISECONDS_IN_A_DAY = 60 * 60 * 24 * 1000; //86400000; +const MILLISECONDS_PER_DAY = 60 * 60 * 24 * 1000; //86400000; -setTimeout(blastOff, MILLISECONDS_IN_A_DAY); +setTimeout(blastOff, MILLISECONDS_PER_DAY); ``` **[⬆ back to top](#table-of-contents)** From 3ff9eba6d460f31db8146762bade4fcc32626762 Mon Sep 17 00:00:00 2001 From: Ryan McDermott Date: Sun, 23 May 2021 11:52:44 -0700 Subject: [PATCH 2/5] Fix `paintCar` example to include `color` as param --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 71896ed4..631db6e8 100644 --- a/README.md +++ b/README.md @@ -180,8 +180,8 @@ const Car = { carColor: "Blue" }; -function paintCar(car) { - car.carColor = "Red"; +function paintCar(car, color) { + car.carColor = color; } ``` @@ -194,8 +194,8 @@ const Car = { color: "Blue" }; -function paintCar(car) { - car.color = "Red"; +function paintCar(car, color) { + car.color = color; } ``` From 384665f8da2de749ad96c694a9e18227cfd08b45 Mon Sep 17 00:00:00 2001 From: Hamed Abdollahi <42994875+hamettio@users.noreply.github.com> Date: Fri, 23 Jul 2021 19:04:42 +0200 Subject: [PATCH 3/5] Persian translation added (Fluent + RTL styled) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 631db6e8..52e2e786 100644 --- a/README.md +++ b/README.md @@ -2381,5 +2381,6 @@ This is also available in other languages: - ![tr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Turkey.png) **Turkish**: [bsonmez/clean-code-javascript](https://github.com/bsonmez/clean-code-javascript/tree/turkish-translation) - ![ua](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Ukraine.png) **Ukrainian**: [mindfr1k/clean-code-javascript-ua](https://github.com/mindfr1k/clean-code-javascript-ua) - ![vi](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Vietnam.png) **Vietnamese**: [hienvd/clean-code-javascript/](https://github.com/hienvd/clean-code-javascript/) +- ![ir](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Iran.png) **Persian**: [hamettio/clean-code-javascript](https://github.com/hamettio/clean-code-javascript) **[⬆ back to top](#table-of-contents)** From 98f1d4a5a3b00c7b201400db6a443817d759859b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eug=C3=A8ne=20d=27Augier?= <101138826+eugene-augier@users.noreply.github.com> Date: Wed, 13 Apr 2022 14:08:10 +0200 Subject: [PATCH 4/5] French translation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 631db6e8..3c06041e 100644 --- a/README.md +++ b/README.md @@ -2365,7 +2365,7 @@ This is also available in other languages: - [alivebao/clean-code-js](https://github.com/alivebao/clean-code-js) - [beginor/clean-code-javascript](https://github.com/beginor/clean-code-javascript) - ![tw](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Taiwan.png) **Traditional Chinese**: [AllJointTW/clean-code-javascript](https://github.com/AllJointTW/clean-code-javascript) -- ![fr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/France.png) **French**: [GavBaros/clean-code-javascript-fr](https://github.com/GavBaros/clean-code-javascript-fr) +- ![fr](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/France.png) **French**: [eugene-augier/clean-code-javascript-fr](https://github.com/eugene-augier/clean-code-javascript-fr) - ![de](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Germany.png) **German**: [marcbruederlin/clean-code-javascript](https://github.com/marcbruederlin/clean-code-javascript) - ![id](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Indonesia.png) **Indonesia**: [andirkh/clean-code-javascript/](https://github.com/andirkh/clean-code-javascript/) - ![it](https://raw.githubusercontent.com/gosquared/flags/master/flags/flags/shiny/24/Italy.png) **Italian**: [frappacchio/clean-code-javascript/](https://github.com/frappacchio/clean-code-javascript/) From 2cab77b8e58dce3f6c418595b7ef70adca1a4258 Mon Sep 17 00:00:00 2001 From: Agil Atakishiyev Date: Sun, 10 Jul 2022 21:05:45 +0400 Subject: [PATCH 5/5] fixed naming --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 631db6e8..e2880d99 100644 --- a/README.md +++ b/README.md @@ -201,9 +201,9 @@ function paintCar(car, color) { **[⬆ back to top](#table-of-contents)** -### Use default arguments instead of short circuiting or conditionals +### Use default parameters instead of short circuiting or conditionals -Default arguments are often cleaner than short circuiting. Be aware that if you +Default parameters are often cleaner than short circuiting. Be aware that if you use them, your function will only provide default values for `undefined` arguments. Other "falsy" values such as `''`, `""`, `false`, `null`, `0`, and `NaN`, will not be replaced by a default value.