Python Function Inside Function Javascript Coderpad Interview