A Javascript solution to analyse inputs and outputs of different gates. plan to network the gate and find the combined output