Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- What is the benefit of wrapping code in function?


g1smd - 6:36 am on Oct 9, 2012 (gmt 0)


You should write modular code. This allows the code to be re-used in multiple places within a program without duplicating it. It also makes the overall code flow easier to read. Since you can isolate small bits of code it also makes it easier to test it in small chunks.


Thread source:: http://www.webmasterworld.com/javascript/4505729.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com