How to change the position of an object through JavaScript

I have placed the object through drag and drop first. But i want to change it’s position [ programmatically through javascript. If I use runtime.getObjects("Obj")[0].x = changedValue it has no effect on the position of the object visually by if I print the new x value of the object in the console it shows the changed value only.
How Can I change it’s value so that it is actually at the new position visually also?

Read the docs, X is protected for a reason :wink: . Also, be careful as the object name is case sensitive.
https://docs.gdevelop-app.com/GDJS%20Runtime%20Documentation/gdjs.RuntimeObject.html#setX