@@ -244,7 +244,7 @@ this guide other than this, you'll be ahead of many developers.
244
244
** Bad:**
245
245
``` javascript
246
246
function emailClients (clients ) {
247
- clients .forEach (client => {
247
+ clients .forEach (( client ) => {
248
248
const clientRecord = database .lookup (client);
249
249
if (clientRecord .isActive ()) {
250
250
email (client);
@@ -373,7 +373,7 @@ code eligible for refactoring.
373
373
**Bad:**
374
374
` ` ` javascript
375
375
function showDeveloperList (developers ) {
376
- developers .forEach (developers => {
376
+ developers .forEach (( developers ) => {
377
377
const expectedSalary = developer .calculateExpectedSalary ();
378
378
const experience = developer .getExperience ();
379
379
const githubLink = developer .getGithubLink ();
@@ -388,7 +388,7 @@ function showDeveloperList(developers) {
388
388
}
389
389
390
390
function showManagerList (managers ) {
391
- managers .forEach (manager => {
391
+ managers .forEach (( manager ) => {
392
392
const expectedSalary = manager .calculateExpectedSalary ();
393
393
const experience = manager .getExperience ();
394
394
const portfolio = manager .getMBAProjects ();
@@ -406,7 +406,7 @@ function showManagerList(managers) {
406
406
**Good**:
407
407
` ` ` javascript
408
408
function showList (employees ) {
409
- employees .forEach (employee => {
409
+ employees .forEach (( employee ) => {
410
410
const expectedSalary = employee .calculateExpectedSalary ();
411
411
const experience = employee .getExperience ();
412
412
@@ -1817,21 +1817,21 @@ from `try/catch`.
1817
1817
**Bad:**
1818
1818
` ` ` javascript
1819
1819
getdata ()
1820
- .then (data => {
1820
+ .then (( data ) => {
1821
1821
functionThatMightThrow (data);
1822
1822
})
1823
- .catch (error => {
1823
+ .catch (( error ) => {
1824
1824
console .log (error);
1825
1825
});
1826
1826
` ` `
1827
1827
1828
1828
**Good:**
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
// One option (more noisy than console.log):
1836
1836
console .error (error);
1837
1837
// Another option:
0 commit comments