Skip to main content

Functions in Applications

Define functions in a logical order.

Always arrange the functions in a logical order. First function should be the first that gets called. This lets future maintenance to be easier also helps when de bugging the application

Single Operation Functions

Each function should perform one specific operation. Functions that do more than one thing can confuse your programming efforts.

Local Variables should be used wherever needed

Local variables help to conserve the computers memory. Local JavaScript variables expire after a function finishes executing. The memory space is then returned to the system.

Next: JavaScript Slideshow Application