Functions in JavaScript can be named or anonymous. Nested functions can access variables of parent functions but not vice versa. Functions can be stored in variables, passed as parameters, and used in expressions. Functions are passed by value, except for objects which are passed by reference. Functions can be invoked as functions, methods, or constructors and indirectly through call and apply. Optional parameters should be passed last and can be handled with undefined checks. Functions create local scopes for variables except global variables. Functions can be used to organize code into namespaces. Higher order functions take and return other functions.