PHP and Javascript solutions to moderate challenges #33 - Double squares, #54 - Cash register, and #135 Word chain