But also if the value is hard coded in, what if the value is changed? el.disabled would still be the previous value, so, it should be a function regardless of how you do it. ------------------------ Gary Katsevman Computer Science Undergraduate Northeastern University gkatsev.com
On Sun, Mar 20, 2011 at 16:16, Jarek Foksa <[email protected]> wrote: > But > >> if (this.disabled) { } > > would look more readable than: > >> if (elementDisabled(this)) { } > > especially considering the fact that I would be using this method all > over the place and I'm 100% sure that I will not be using third-party > code that could clash with my extensions. > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected] > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
