There are a number of type conditions
if(a == 1 && b == 2 || a == 2 && b == 1) { c = 4; } if(a == 1 && b == 3 || a == 3 && b == 1) { c = 7; } Since the conditions are "symmetrical", they can be simplified if you register in the form of a hash:
{"1-2":4, "1-3":7, ...} But how to use such a hash instead of conditions if there are a and b at the input?
Give at least one simple example to understand the essence
thank