On 25/03/2006 23:15, DoomedLung wrote:
> What does this operator ">-" stand for or mean, as in...
[snip]
> this.dom = document.getElementById ? 1 : 0;
If this code must be used at all,
this.dom = !!document.getElementById;
would be better. See below, though.
> this.opera5 = this.agent.indexOf("Opera 5") >- 1;
It is, in fact, two separate operators. The greater-than relational
operator, and the unary negation operator. The code would act the same
(and be more readable) if it were written:
this.opera5 = this.agent.indexOf('Opera 5') > -1;
> I'm sort of a nOOb any help would much appreciated
Then some very useful advice would be to avoid this code altogether.
Browser detection is flawed and unreliable. Use feature detection instead.
<http://www.jibbering.com/faq/faq_notes/not_browser_detect.html>
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.