digital_electricity: Result checking: check result in dataset
Previously, we were checking the result for each level in the js, via
brute force checking of the level numbers to decide the answer of an
operation:
if (currentLevel == ...) { ... } else if (currentLevel == ...) { ... } ...
This is avoided by keeping a result() function in the dataset itself,
and the operationResult is calculated via:
operationResult = levelProperties[currentLevel - 1].result(A, B)
Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>