end is a special primitive that tells NetLogo that a procedure is finished. Just as a procedure starts with either to or to-report, it concludes with an end. A procedure that does not finish with end will cause an error.
Once you mastered the end primitive, don't stop there. Check out the resources below to improve your NetLogo skills.
end primitive: