Add #16 JavaScript solution