Learn function in JavaScript, syntax to declare function, types of functions, calling functions from other functions, self-invoking function
Read this post on scientecheasy.com