# setProperty

```lua
return function()
    setProperty(data, 'test', 20);
    log(data.test); --prints 20
    
    data.test = 30;
    log(data.test); --prints 30
    
    setProperty(data, 'test', 20); --this will not set the property, since it already exists!
    log(data.test); --prints 30
end
```

{% hint style="info" %}
Notice the last log prints 30 because the previous setProperty was ignored (because a value already exists there)
{% endhint %}
