Results 1 to 3 of 3

Thread: Equals

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default Equals

    Can't find documentation on the equals operators, specifically when to use == and ===? I can't seem to google "=". Thanks for any ideas.

  2. #2
    Join Date
    Jul 2008
    Posts
    199
    Thanks
    6
    Thanked 58 Times in 57 Posts

  3. The Following User Says Thank You to techietim For This Useful Post:

    bluewalrus (11-10-2009)

  4. #3
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Just a little addition to Tim's post.


    == is to compare, and return false if the values are different.
    === is to compare, and see if the types (array, string, number) are the same, and then return false on failure.
    Jeremy | jfein.net

  5. The Following User Says Thank You to Nile For This Useful Post:

    bluewalrus (11-10-2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •