Started JavaScript solution