clarity in destructuring code example

readme
This commit is contained in:
Sean McCambridge
2016-01-05 17:11:48 -05:00
parent 286e845b53
commit 52047535bd

View File

@@ -378,8 +378,8 @@ Other Style Guides
}
// good
function getFullName(obj) {
const { firstName, lastName } = obj;
function getFullName(user) {
const { firstName, lastName } = user;
return `${firstName} ${lastName}`;
}