POV-Ray : Newsgroups : povray.beta-test : I have a hunch some of you may like this... Server Time
29 Apr 2024 15:43:41 EDT (-0400)
  I have a hunch some of you may like this... (Message 21 to 21 of 21)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: I have a hunch some of you may like this...
Date: 5 Oct 2016 12:07:27
Message: <57f5253f$1@news.povray.org>
Am 05.10.2016 um 17:42 schrieb clipka:

>>> I'm trying to find out if JavaScript does something similar to method 3,
>>> but I don't think it can.
>>>
>>> http://www.w3schools.com/js/js_objects.asp
>>>
>>> Mike
>>
>> I take that back. It can and does.
>>
>>     var textIdentifier = "blah"
>>     var tableObject =
>>     {
>>         [textIdentifier]: "wee"
>>     }
>>     alert(tableObject[textIdentifier])
> 
> .... or, alternatively:
> 
>     var tableObject =
>     {
>       "blah": "wee"
>     }

... not to forget:

    var tableObject =
    {
      blah: "wee"
    }


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.