@@ -247,7 +247,7 @@ this guide other than this, you'll be ahead of many developers.
247
247
** Bad:**
248
248
``` javascript
249
249
function emailClients (clients ) {
250
- clients .forEach (client => {
250
+ clients .forEach (( client ) => {
251
251
const clientRecord = database .lookup (client);
252
252
if (clientRecord .isActive ()) {
253
253
email (client);
@@ -376,7 +376,7 @@ code eligible for refactoring.
376
376
** Bad:**
377
377
``` javascript
378
378
function showDeveloperList (developers ) {
379
- developers .forEach (developer => {
379
+ developers .forEach (( developer ) => {
380
380
const expectedSalary = developer .calculateExpectedSalary ();
381
381
const experience = developer .getExperience ();
382
382
const githubLink = developer .getGithubLink ();
@@ -391,7 +391,7 @@ function showDeveloperList(developers) {
391
391
}
392
392
393
393
function showManagerList (managers ) {
394
- managers .forEach (manager => {
394
+ managers .forEach (( manager ) => {
395
395
const expectedSalary = manager .calculateExpectedSalary ();
396
396
const experience = manager .getExperience ();
397
397
const portfolio = manager .getMBAProjects ();
@@ -409,7 +409,7 @@ function showManagerList(managers) {
409
409
** Good** :
410
410
``` javascript
411
411
function showList (employees ) {
412
- employees .forEach (employee => {
412
+ employees .forEach (( employee ) => {
413
413
const expectedSalary = employee .calculateExpectedSalary ();
414
414
const experience = employee .getExperience ();
415
415
@@ -1828,21 +1828,21 @@ from `try/catch`.
1828
1828
** Bad:**
1829
1829
``` javascript
1830
1830
getdata ()
1831
- .then (data => {
1831
+ .then (( data ) => {
1832
1832
functionThatMightThrow (data);
1833
1833
})
1834
- .catch (error => {
1834
+ .catch (( error ) => {
1835
1835
console .log (error);
1836
1836
});
1837
1837
```
1838
1838
1839
1839
** Good:**
1840
1840
``` javascript
1841
1841
getdata ()
1842
- .then (data => {
1842
+ .then (( data ) => {
1843
1843
functionThatMightThrow (data);
1844
1844
})
1845
- .catch (error => {
1845
+ .catch (( error ) => {
1846
1846
// One option (more noisy than console.log):
1847
1847
console .error (error);
1848
1848
// Another option:
0 commit comments