Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Javascript
How optimized ar eif-statements in JS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="John G Harris, post: 4972164"] On Fri, 23 May 2008 at 23:02:56, in comp.lang.javascript, dhtml wrote: <snip> I've not seen a detailed explanation of this rule but I gather the idea is that each function should have just one exit point. This makes it easier to check every code path and to confirm that all code paths have been tested (I think). However, a lot of experts agree that a few if (nothing to do) return; at the beginning of the function is harmless. It's having exits buried deep inside a tangle of if's and while's that's a problem. The usual rule : messy code is bad. John [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Javascript
How optimized ar eif-statements in JS
Top