Avoid Let Variable Depending On Condition

Topic
๐Ÿงน Clean Code
-----------------

Having a let value is always a sign to change something. Consider using a function that returns the values into a const

// problem:

let values;

if (a) {
	values = xyz;
}
else {
	values = abc;
}

// solution

const values = rebuildValues();

rebuildValues() {
	if(a) {
		return xyz;
	}
	else {
		return abc;
	}
};

  1. Clean code - write your code like an author writes a story