Python Short Circuit Evaluation Javascript Interview