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


Groups > comp.lang.javascript > #34006

Re: undefined string in an object?

Newsgroups comp.lang.javascript
Subject Re: undefined string in an object?
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <bb27e72b-f746-44f9-a1d5-d6c5673b9ef7@googlegroups.com> <3038716d-f026-476d-b8e6-2634878fab72@googlegroups.com>
Date 2017-09-22 19:20 +0200
Message-ID <XnsA7F8C4B7FE614eejj99@194.109.6.166> (permalink)

Show all headers | View raw


jonas.thornvall@gmail.com wrote on 22 Sep 2017 in comp.lang.javascript:

> Den torsdag 7 september 2017 kl. 01:33:10 UTC+2 skrev JRough:
>> me (JRough change)      
>> 
>> 4:31 PM (less than a minute ago)
>> 
>> 
>> var a={}; 
>>     a["b"]=123, 
>>     a["c"]=456; 
>> console.log(a["b"]); 
>> undefined 
>> 
>> var a={}; 
>>     a.b=123, 
>>     a.c=456; 

[..]
 
> Can you really have a string as an index?
> isn't a[] supposed to be an array, i see you guys call it object here?

An object {} and an array [] are NOT!!!!!! the same.

Why not go back to basics and study for a few .... months?



-- 
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

undefined string in an object? JRough <janis.rough@gmail.com> - 2017-09-06 16:33 -0700
  Re: undefined string in an object? Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-09-09 11:07 -0300
    Re: undefined string in an object? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-10 16:20 +0200
      Re: undefined string in an object? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-09-18 15:37 +0100
        Re: undefined string in an object? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-18 17:17 +0200
          Re: undefined string in an object? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-09-19 11:05 +0100
            Re: undefined string in an object? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-19 12:58 +0200
              Re: undefined string in an object? Flng Fck <nothanks@invalid.invalid> - 2017-09-20 09:37 +0200
              Re: undefined string in an object? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-09-20 10:49 +0100
                Re: undefined string in an object? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-09-20 20:29 +0100
                Re: undefined string in an object? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-09-21 16:12 +0100
  Re: undefined string in an object? jonas.thornvall@gmail.com - 2017-09-22 06:11 -0700
    Re: undefined string in an object? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-09-22 19:20 +0200
    Re: undefined string in an object? John G Harris <niam@jghnorth.org.uk.invalid> - 2017-09-23 10:55 +0100
      Re: undefined string in an object? jonas.thornvall@gmail.com - 2017-09-23 09:02 -0700

csiph-web