data.responseData.results > 0 on AJAX Libraries API home page

18 views
Skip to first unread message

Prashant Bhate

unread,
Jul 4, 2008, 6:02:49 AM7/4/08
to Google AJAX API
Hi
Code sinppet on home page http://code.google.com/apis/ajaxlibs/,
has this line
if (data.responseData.results && data.responseData.results > 0)

Was able to understand the first part of it but not the next ?!!

Array Object Object being compared with a zero ?!!

shouldnt it have been like

if ( data.responseData.results
&& data.responseData.results.length
&& data.responseData.results.length > 0)

though not very sure !!!

jgeerdes [AJAX APIs "Guru"]

unread,
Jul 4, 2008, 5:12:50 PM7/4/08
to Google AJAX API
I would say you are correct. Perhaps Mr. Lisbakken or one of the
other dev team members could change this when they're back from their
long weekend.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
jgee...@mchsi.com

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

Prashant Bhate

unread,
Jul 5, 2008, 12:15:08 PM7/5/08
to Google AJAX API
Thanks :))

On Jul 4, 10:12 pm, "jgeerdes [AJAX APIs \"Guru\"]"
<jgeer...@mchsi.com> wrote:
> I would say you are correct.  Perhaps Mr. Lisbakken or one of the
> other dev team members could change this when they're back from their
> long weekend.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.com
> jgeer...@mchsi.com
Reply all
Reply to author
Forward
0 new messages