check if array is empty

Discussion in 'Javascript' started by bigbuddha, Aug 22, 2003.

  1. bigbuddha

    bigbuddha Guest

    how do i check i testarray[] is empty or not?

    thanks

    --
    +++-BigBuddha-+++
    ---------------------------
    ---www.bigbuddha.be---
    ---------------------------
    "Light is faster than sound. Thats why people look intelligent untill you
    hear them speak."
    bigbuddha, Aug 22, 2003
    #1
    1. Advertising

  2. bigbuddha

    Clubberboy Guest

    Op Fri, 22 Aug 2003 13:15:24 +0200 schreef "bigbuddha"
    <>:

    >how do i check i testarray[] is empty or not?
    >
    >thanks


    if (testarray.length <1) alert("array is empty");

    --
    http://www.techtronix.be
    Clubberboy, Aug 22, 2003
    #2
    1. Advertising

  3. bigbuddha

    bigbuddha Guest

    Clubberboy wrote:
    > Op Fri, 22 Aug 2003 13:15:24 +0200 schreef "bigbuddha"
    > <>:
    >
    >> how do i check i testarray[] is empty or not?
    >>
    >> thanks

    >
    > if (testarray.length <1) alert("array is empty");


    thanks for the quick help

    --
    +++-BigBuddha-+++
    ---------------------------
    ---www.bigbuddha.be---
    ---------------------------
    "Light is faster than sound. Thats why people look intelligent untill
    you hear them speak."
    bigbuddha, Aug 22, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John

    empty/non-empty element

    John, Jul 15, 2003, in forum: XML
    Replies:
    1
    Views:
    1,012
    Klaus Johannes Rusch
    Jul 16, 2003
  2. Lukas
    Replies:
    3
    Views:
    787
    spiff
    Nov 10, 2005
  3. Marcia Hon

    Check if a directory is empty and empty it

    Marcia Hon, Feb 8, 2004, in forum: C Programming
    Replies:
    8
    Views:
    565
    Dave Thompson
    Feb 14, 2004
  4. Brian Roberts

    empty lists vs empty generators

    Brian Roberts, May 3, 2005, in forum: Python
    Replies:
    12
    Views:
    644
    Jeremy Bowers
    May 4, 2005
  5. chutsu
    Replies:
    6
    Views:
    851
    Antoninus Twink
    Jun 3, 2009
Loading...

Share This Page