DEV Community

Discussion on: 10 Clean code examples (Javascript).

Collapse
 
_genjudev profile image
Larson • Edited

Like it.

6 could be better by just creating the object directly. Its faster and better to read.

Also dont to 10. If u coding like that there is a good chance u get race conditions. Also by working with objects:

let a = b = c = {"a":"b"}
a.a = "p"

console.log(c)
// { a: "p" }
Enter fullscreen mode Exit fullscreen mode
Collapse
 
redbossrabbit profile image
Ibeh Ubachukwu

Thanks! Learning never stops.