@@ -247,7 +247,7 @@ this guide other than this, you'll be ahead of many developers.
247247** Bad:**
248248``` javascript
249249function emailClients (clients ) {
250- clients .forEach (client => {
250+ clients .forEach (( client ) => {
251251 const clientRecord = database .lookup (client);
252252 if (clientRecord .isActive ()) {
253253 email (client);
@@ -376,7 +376,7 @@ code eligible for refactoring.
376376** Bad:**
377377``` javascript
378378function showDeveloperList (developers ) {
379- developers .forEach (developer => {
379+ developers .forEach (( developer ) => {
380380 const expectedSalary = developer .calculateExpectedSalary ();
381381 const experience = developer .getExperience ();
382382 const githubLink = developer .getGithubLink ();
@@ -391,7 +391,7 @@ function showDeveloperList(developers) {
391391}
392392
393393function showManagerList (managers ) {
394- managers .forEach (manager => {
394+ managers .forEach (( manager ) => {
395395 const expectedSalary = manager .calculateExpectedSalary ();
396396 const experience = manager .getExperience ();
397397 const portfolio = manager .getMBAProjects ();
@@ -409,7 +409,7 @@ function showManagerList(managers) {
409409** Good** :
410410``` javascript
411411function showList (employees ) {
412- employees .forEach (employee => {
412+ employees .forEach (( employee ) => {
413413 const expectedSalary = employee .calculateExpectedSalary ();
414414 const experience = employee .getExperience ();
415415
@@ -1828,21 +1828,21 @@ from `try/catch`.
18281828** Bad:**
18291829``` javascript
18301830getdata ()
1831- .then (data => {
1831+ .then (( data ) => {
18321832 functionThatMightThrow (data);
18331833})
1834- .catch (error => {
1834+ .catch (( error ) => {
18351835 console .log (error);
18361836});
18371837```
18381838
18391839** Good:**
18401840``` javascript
18411841getdata ()
1842- .then (data => {
1842+ .then (( data ) => {
18431843 functionThatMightThrow (data);
18441844})
1845- .catch (error => {
1845+ .catch (( error ) => {
18461846 // One option (more noisy than console.log):
18471847 console .error (error);
18481848 // Another option:
0 commit comments