therefore, I am on a train in the circuit and want to start avoiding it at all costs.
The problem I see is the following example: how to use const in a situation with more than two forks in a logical tree. what's the equivalent pattern with const?
function getResult(input) {
let result;
switch (input): {
case (1): { result=x;}
case (2): { result=y;}
case (3): { result=x;}
...etc
}
}
thank,
source
share