I'm confused about JavaScript especially in the "function " aspect