Below object appends div element to the body whenever obj.appendDiv() method is called.
var obj = {
width: 100,
height: 100,
background: "black",
appendDiv: function () {
var div = document.createElement('div');
div.style.width = this.width;
div.style.height = this.height;
div.style.background = this.background;
document.body.appendChild(div)
}
}
How to change all derived data in all appended divs whenever any parameters of obj are changed like typing obj.width = "500px" in console, changes all appended divs width.
$("div").css("width", "500px");