Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37219
| From | "R.Wieser" <address@not.available> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Create a string dynamically to reference a property of an object? |
| Date | 2019-09-11 10:11 +0200 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <qlaa8g$81f$1@gioia.aioe.org> (permalink) |
| References | <aba8a905-8515-4be8-9e03-040f60d109e5@googlegroups.com> <ql8vb5$iqr$1@gioia.aioe.org> <d982f5c8-87f9-4fd7-a03e-3f18bdfcb718@googlegroups.com> <qla7vp$1tib$1@gioia.aioe.org> <db45023c-8824-4c4f-8ed2-4bbd1ede94ec@googlegroups.com> |
Jonas,
> I was a bit surprised i must say that the interpretator actually
> do interpretate the expression between brackets "pleasantly
> surprised", now i just have to remember it.
:-) For the record: AFAICT everywhere where you can put in an argument you
can also put in an expression. And that means that, apart from static
strings and/or variables, you also can call other functions there.
Like this:
- - - - - - - - - - - - - - - - - - - -
function MultiplyByTwo(arg1) {
return arg1 * 2
}
var myVar = document.getElementById( 'inBox' + MultiplyByTwo(3) ).checked;
- - - - - - - - - - - - - - - - - - - -
Regards,
Rudy Wieser
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Create a string dynamically to reference a property of an object? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-10 11:41 -0700
Re: Create a string dynamically to reference a property of an object? Julio Di Egidio <julio@diegidio.name> - 2019-09-10 12:38 -0700
Re: Create a string dynamically to reference a property of an object? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-10 14:02 -0700
Re: Create a string dynamically to reference a property of an object? dr.j.r.stockton@gmail.com - 2019-09-11 12:58 -0700
Re: Create a string dynamically to reference a property of an object? "R.Wieser" <address@not.available> - 2019-09-10 21:59 +0200
Re: Create a string dynamically to reference a property of an object? Julio Di Egidio <julio@diegidio.name> - 2019-09-10 13:04 -0700
Re: Create a string dynamically to reference a property of an object? "R.Wieser" <address@not.available> - 2019-09-11 09:33 +0200
Re: Create a string dynamically to reference a property of an object? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-11 00:52 -0700
Re: Create a string dynamically to reference a property of an object? "R.Wieser" <address@not.available> - 2019-09-11 10:11 +0200
Re: Create a string dynamically to reference a property of an object? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-11 02:09 -0700
Re: Create a string dynamically to reference a property of an object? "R.Wieser" <address@not.available> - 2019-09-11 13:59 +0200
Re: Create a string dynamically to reference a property of an object? Julio Di Egidio <julio@diegidio.name> - 2019-09-11 02:11 -0700
Re: Create a string dynamically to reference a property of an object? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2019-09-11 03:48 -0700
Re: Create a string dynamically to reference a property of an object? "R.Wieser" <address@not.available> - 2019-09-11 13:48 +0200
csiph-web