Results 1 to 2 of 2

Thread: Whats the '!' for in javascript?

  1. #1

    Thread Starter
    Addicted Member BIOSTALL's Avatar
    Join Date
    Apr 2005
    Location
    Northampton, UK
    Posts
    180

    Whats the '!' for in javascript?

    Hey, i found the following piece of code on the internet:

    var newwindow = '';

    function popitup(url)
    {
    if (!newwindow.closed && newwindow.location)
    {
    newwindow.location.href = url;
    }
    else
    {
    newwindow=window.open(url,'name','height=200,width=150');
    if (!newwindow.opener) newwindow.opener = self;
    }

    I was just wondering what the '!' is for in '!newwindow.closed'. I've come across it many times before but never actually understood what it does.

    Thanks, BIOSTALL

  2. #2
    Member
    Join Date
    Mar 2005
    Posts
    56

    Re: Whats the '!' for in javascript?

    It's the not operator. Not Operator

Posting Permissions

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



Click Here to Expand Forum to Full Width