Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Active reading [<https://en.wikipedia.org/wiki/JavaScript>].
Source Link
Peter Mortensen
  • 31.3k
  • 22
  • 110
  • 134

To reference a variable in javascriptJavaScript with only a string, you can use

window['your_variable_name']

You can set and reference variables, and objects in variables too.

To reference a variable in javascript with only a string, you can use

window['your_variable_name']

You can set and reference variables, and objects in variables too.

To reference a variable in JavaScript with only a string, you can use

window['your_variable_name']

You can set and reference variables, and objects in variables too.

Source Link
aidanjacobson
  • 2.4k
  • 1
  • 21
  • 18

To reference a variable in javascript with only a string, you can use

window['your_variable_name']

You can set and reference variables, and objects in variables too.

lang-js

AltStyle によって変換されたページ (->オリジナル) /