Add #48 JavaScript solution