If Exists in Javascript

Results 1 to 2 of 2

Thread: If Exists in Javascript

  1. #1
    Join Date
    Dec 1969

    Default If Exists in Javascript

    Is there a function in Javascript that checks to see if an object exists before you include it in your code.<BR><BR>Thanks<BR><BR>Paul

  2. #2
    Join Date
    Dec 1969

    Default RE: If Exists in Javascript

    The classic JavaScript approach is:<BR><BR>if(myObject) {<BR>...<BR>}<BR><BR>This works because an undefined object is equivalent to false in a boolean context.<BR><BR>Dunc

Posting Permissions

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