A lot of the design of the web is based on templates, so to create a simple function that is used only once, then never again, it has no use.
The other thing I would like to point out is that if you use this function in your website, you should give it a unique name. So if you have a div in your website and you make a function called “newDiv”, then you can call it “newDiv”, instead of just “newDiv”.
But why? Well, I think the reason is because you could use the template to add the new div to a div. Why don’t you just place the new div above the current one, put it as a new div, and then you can call it newDiv? It’s a nice way to do it.
Well, basically this is because you are modifying something that already exists, and instead of creating a new object, you are simply replacing an old one.