Add JavaScript solution