Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #27283

Re: Puzzling JS Error

Newsgroups comp.lang.javascript
Subject Re: Puzzling JS Error
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <consduF625qU1@mid.individual.net>
Date 2015-04-09 22:21 +0200
Message-ID <XnsA477E3791CCF3eejj99@194.109.133.246> (permalink)

Show all headers | View raw


"Mel Smith" <syntel@cox.net> wrote on 09 apr 2015 in comp.lang.javascript:

> ****** fragment of Ajax set up code ********
> 
> var HTTP;
[..]
> // problem in this next statement
> if (HTTP && (typeof HTTP !== "object" || HTTP.NAME)) {

This 'if' will never see (true),
since HTTP is only declared so is false
and false && true :

try:

var HTTP;alert(!!HTTP && true); // returns false
var HTTP2;alert(!!HTTP2 && false); // returns false



>     throw new Error("Namespace 'HTTP' already exists");
>    }
> */
> alert("Ready toComplete Ajax set up.") ;
> 
> *********************************
> 



-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-09 11:49 -0600
  Re: Puzzling JS Error "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-09 22:21 +0200
    Re: Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-09 16:26 -0600
      Re: Puzzling JS Error "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-10 10:32 +0200
      Re: Puzzling JS Error Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-10 14:51 +0000
        Re: Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-10 09:48 -0600
          Re: Puzzling JS Error "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-10 18:01 +0200
  Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-10 00:20 +0200
  Re: Puzzling JS Error JJ <jj4public@vfemail.net> - 2015-04-10 11:15 +0700
    Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-11 16:15 +0200
      Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 18:09 -0300
        Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-11 23:42 +0200
          Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 19:27 -0300
            Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-12 01:01 +0200
              Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-12 01:07 +0200
                Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 22:07 -0300

csiph-web