Daily JavaScript Tips #1

I am 17 years old and a young passionate and self-taught frontend web developer and have an intention to become a successful developer. I usually write about JavaScript and Web Development and share some tips in the articles.
Pass arguments as an object.
The code becomes much more clear and easily understandable as the name of the properties is clearly visible to you as well any code reviewer.
Don't do this β
const user = (name, email, proUser) => {
// Logic goes here
}
user('SnowBit', 'xyz@someemail.zyx', true);
Do this β
const user = ({name, email, proUser, isAdmin}) => {
// Logic goes here
}
user({
name: 'SnowBit',
email: 'xyz@someemail.zyx',
proUser: true,
isAdmin: true
});
Thank you for reading
- Follow me on Twitter - @codewithsnowbit
- Subscribe me on YouTube - Code With SnowBit




