Leetcode System Verilog Logical Operators In Javascript