JS Refactoring Combo: Extract Array Constant From String Comparison Chain
When a variable is compared against a string value, the easiest way to start is with a variable === "value" or variable !== "value" comparison. Over time, these can grow into longer sequences, e.g. variable === "value1" || variable === "value2" || va...
p42.hashnode.dev1 min read