This flaw/smell appear due to variable that may similar to another variable which resulted confusion and hard to maintain in the future.
Names should speak language of business(Mattas Sunny, 2020)
If I asked "Why could this flaw appear?: I probably would say because I generally more task-goal-oriented. so I did what I know without any consideration on the beauty of the code
const header = new Headers();
header.append('Content-Type', 'application/json');
const headers = new Headers();
headers.append('Content-Type', 'application/json');
headers.append('Authorization', `Bearer ${data.token}`);
This flaw/smell appear due to variable that may similar to another variable which resulted confusion and hard to maintain in the future.
Names should speak language of business(Mattas Sunny, 2020)
If I asked "Why could this flaw appear?: I probably would say because I generally more task-goal-oriented. so I did what I know without any consideration on the beauty of the code