About 521,000 results
Open links in new tab
  1. How do I put variables inside javascript strings? - Stack Overflow

    You can use find-and-replace library for variables, like custom-string-formatter.

  2. How to interpolate variables in strings in JavaScript, without ...

    I was wondering if this same thing is possible in JavaScript as well. Using variables inside strings without using concatenation — it looks more concise and elegant to write.

  3. How to use a variable for a key in a JavaScript object literal?

    How to use a variable for a key in a JavaScript object literal? Asked 15 years, 10 months ago Modified 3 years ago Viewed 325k times

  4. javascript - Why are global variables considered bad practice?

    Apr 10, 2016 · Secondly, global variables take longer for Javascript to "find" than local variables. The difference in speed isn't huge, but it does exist. For further reading and a more in-depth …

  5. Access CSS variable from javascript - Stack Overflow

    Is there a way to access a css variable from javascript? Here my css variable declaration.

  6. Can I access variables from another file? - Stack Overflow

    Jul 14, 2010 · Is it possible to use a variable in a file called first.js inside another file called second.js? first.js contains a variable called colorcodes.

  7. javascript - How can I use the variables from "views.py" in …

    Is there a way to access the same variable in JavaScript, <script></script> (perhaps using the DOM; I don't know how Django makes the variables accessible)? I want to be able to look up …

  8. How do I use this JavaScript variable in HTML? - Stack Overflow

    May 5, 2015 · Learn how to use JavaScript variables in HTML effectively with this detailed discussion on Stack Overflow.

  9. What is the purpose of the var keyword and when should I use it …

    Apr 13, 2012 · When variables get defined without the use of var keyword, what it looks like is a simple “assignment” operation. When the value is assigned to a variable in javascript, the …

  10. How to insert variables in JavaScript strings? - Stack Overflow

    Strings are immutable in JavaScript as well. The plus (concatenation) operator makes a new string from pieces of an old one.