# Anyone for Javascript?

**URL:** <https://forum.juce.com/t/anyone-for-javascript/11675>\
**Category:** General JUCE discussion\
**Created:** [October 17, 2013, 8:09am UTC](https://forum.juce.com/t/anyone-for-javascript/11675 "2013-10-17T08:09:26Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![chrisboy2000](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@chrisboy2000](https://forum.juce.com/u/chrisboy2000)\
**Post date:** [March 25, 2017, 10:07pm UTC](https://forum.juce.com/t/anyone-for-javascript/11675/16 "2017-03-25T22:07:13Z")

</div>

I think the reason it is const is just because no one asked for it (I was [requesting](https://forum.juce.com/t/access-to-the-properties-of-the-javascript-root-object/13689) this method for implementing some debugging features and didn’t need to alter it).

I can’t think of any scenario that might cause harms if you change the NamedValueSet. Take for instance the assignment of a UnqualifiedName:

```javascript
        void assign (const Scope& s, const var& newValue) const override
        {
            if (var* v = getPropertyPointer (s.scope, name))
                *v = newValue;
            else
                s.root->setProperty (name, newValue);
        }

```

So even if you do the most evil thing possible and delete a property (which I would not recommend), it just sets it again - we’ll ignore the race condition that might occur if you delete it on another thread just after the pointer was created in the if-condition since the whole engine is not threadsafe at all.

It would be more problematic if this assignment would store a pointer to a var in the NamedValueSet which changes as soon as you call a non const method on the NamedValueSet.

---

_[View the full topic](https://forum.juce.com/t/anyone-for-javascript/11675)._
