Add #52 JavaScript solution