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


Groups > comp.lang.javascript > #35151

Re: Output not defined

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Output not defined
Date 2018-06-01 17:54 +0100
Organization A noiseless patient Spider
Message-ID <87bmcuwiqe.fsf@bsb.me.uk> (permalink)
References <d47e4fde-edba-4108-913c-f5902b538935@googlegroups.com> <XnsA8F47B210D5E6eejj99@194.109.6.166> <d2efe184-3334-47d6-84a1-f92291819f2b@googlegroups.com> <XnsA8F481BFF2A81eejj99@194.109.6.166> <0f701b52-56fa-4318-b045-06682c46a6a9@googlegroups.com>

Show all headers | View raw


Jonas Thörnvall <jonas.thornvall@gmail.com> writes:

> No i thought if i put var output; in main as global, how could it not
> be defined further down the chain, because it says undefined.

You may be confusing output having the value undefined, and the concept
of a name having no binding.  When a name can't be resolved (maybe
because the programmer forgot to write "var output;") a ReferenceError
is raised.  When a variable name *can* be resolved but no value has been
assigned to it (such as when you write "var output;"), the variable will
have the undefined value.  This is the sole value of the Undefined
type.

-- 
Ben.

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


Thread

Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 00:10 -0700
  Re: Output not defined "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-01 12:06 +0200
    Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 03:33 -0700
      Re: Output not defined "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-01 12:45 +0200
        Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 03:49 -0700
          Re: Output not defined "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-01 12:57 +0200
          Re: Output not defined Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-06-01 17:54 +0100
            Re: Output not defined Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-06-01 19:10 +0200
            Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 10:53 -0700
            Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 13:24 -0700
              Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 07:42 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 07:57 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 07:59 -0700
                Re: Output not defined "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-02 18:05 +0200
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 09:19 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 09:28 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 09:36 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 09:49 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 11:06 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 11:18 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-02 09:43 -0700
                Re: Output not defined "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2018-06-02 22:44 +0200
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-03 04:36 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-03 04:53 -0700
                Re: Output not defined John G Harris <niam@jghnorth.org.uk.invalid> - 2018-06-03 15:06 +0100
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-03 11:01 -0700
                Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-03 11:09 -0700
  Re: Output not defined Jake Jarvis <pig_in_shoes@yahoo.com> - 2018-06-01 15:03 +0200
    Re: Output not defined Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-06-01 10:49 -0700

csiph-web