JavaScript expressed in Python