Add #45 JavaScript solution