About 314,000 results
Open links in new tab
  1. Javascript create reference to an object property?

    May 12, 2014 · Javascript Reference Object Attribute With Variable. 1. JavaScript objects as property of object reference ...

  2. Does JavaScript pass by reference? - Stack Overflow

    Oct 28, 2012 · Primitives are passed by value, and Objects are passed by "copy of a reference". Specifically, when you pass an object (or array) you are (invisibly) passing a reference to that …

  3. javascript - How to check if two vars have the same reference?

    May 3, 2020 · idea: since internal reference is managed by implementation and isn't exposed we can do the following trick: we'll try to temporarily add +1 randomly named new property with …

  4. JavaScript by reference vs. by value - Stack Overflow

    Jul 7, 2011 · Javascript is always pass by value, but when a variable refers to an object (including arrays), the "value" is a reference to the object. Changing the value of a variable never …

  5. How can a JavaScript object refer to values in itself?

    May 7, 2010 · If you're dealing with JavaScript source code, and not dealing with a string, you're not dealing with JSON.) There's no way within the object initializer to refer to another key of …

  6. Is JavaScript a pass-by-reference or pass-by-value language?

    In JavaScript an object is a reference to a collection of properties (and slots). When a function is called with an object as argument, then this does not create a new collection of properties . …

  7. Pass-by-reference JavaScript objects - Stack Overflow

    May 18, 2016 · Javascript is always pass by value, but when a variable refers to an object (including arrays), the "value" is a reference to the object. Changing the value of a variable …

  8. Javascript: interpret string as object reference? - Stack Overflow

    Javascript use variable as object name. How do I get JS to treat a string as a reference to a previously defined object? Simplified: var myObject = new MyObject(); var myString = …

  9. Unique object identifier in javascript - Stack Overflow

    Apr 12, 2023 · @Justin Adding properties to Object.prototype is problematic in ECMAScript 3 because these proprieties are enumerable on all objects.

  10. Pass variables by reference in JavaScript - Stack Overflow

    However, one would also be able to modify the object reference in the calling environment, and that's the key thing that you can't do in JavaScript. A pass-by-reference language would pass …

Refresh