VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Clean Code: Functions (Part 1) - Beau teaches JavaScript

Clean Code: Functions (Part 1) - Beau teaches JavaScript

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Learn the best practices of how to create Clean Code in JS. This video tutorial is part 1 of how easy is to make Javascript functions that are readable, reusable, and refactorable. Thanks to Ryan McDermott (-ryconoclast) for writing the article that inspired this video. Ryan's article: - https://github.com/ryanmcdermott/clean-code-javascript Code: - http://codepen.io/beaucarnes/pen/apBwMV?editors=0010 Beau Carnes on
Date: 2022-03-14

Comments and reviews: 4


Beau, what's your take on ternary operators with respect to -clean- code? I've seen the complaint that they aren't as readable as ifs, but I happen to like them (as long as there's no nesting or really weird stuff going on). For example at about 7:00 lines 104 to 108 could be,
const portfolio = employee.type === 'manager' ? employee.getMBAProjects() : employee.getGithubLink();
and you would retain the use of const. But, would this be considered -clean-? As a newer programmer, these nuances are tough to figure out, so thanks for these videos.

reply

-Thanks to Ryan McDermott (-ryconoclast) for writing the article that inspired this video.-... you mean, copied and pasted everything and made few mistakes doing that? You had one job.
reply

U said of removing duplicate in code...then told not using flags and then made 2 functions with almost duplicate code? Which practice should I follow!
reply

At 1:32 , emailClient is still filtering the records, maybe one could directly get an array of active clients and call email functions on it
reply
Add a review, comment






Other channel videos