Query regarding proc.join() function

Sir could not understand the use of proc.join() at the end and what if we want to pass argument in the calling function showSquare()