Javascrip interactive

Is this how to merge things? :)