Solution for JS challenge 1 (translate_to_js)