Make a ranged weapon attack against the target. On a hit, the target takes damage from the javelin plus 4d6 lightning damage. If you miss the shot with the javelin, does it ever actually reach its target? Or does it continue to be a five-foot corridor of lightning until ...
The target and each creature within 5 feet of it must succeed on a Dexterity saving throw or take 2d6 cold damage. The fact that the piercing damage is dealt, and then the cold damage is taken means that this is two different instances of damage separated in time and two Co...