A teenager knocked a man unconscious with a gas cannister after he and his friends were advised to stop inhaling laughing gas.