J
johncoltrane
Hi, a few months ago I've played with the JSON Tumblr API. I tried
(succesfully) to build a page dynamically and then went to other
experiments.
Now that I came back to playing with said API I'm intrigued by this
piece of code I wrote :
var newPost = function()
{
this.element = new Object(document.createElement('div'));
// other stuff
};
Well, what is intriguing here is that I never use new Object() in such
a context and always go with something like :
this.element = document.createElement('div');
Now I'm not asking for a psycho-analysis; I would just want to know if
there is any actual difference between the two ways.
Thanks
(succesfully) to build a page dynamically and then went to other
experiments.
Now that I came back to playing with said API I'm intrigued by this
piece of code I wrote :
var newPost = function()
{
this.element = new Object(document.createElement('div'));
// other stuff
};
Well, what is intriguing here is that I never use new Object() in such
a context and always go with something like :
this.element = document.createElement('div');
Now I'm not asking for a psycho-analysis; I would just want to know if
there is any actual difference between the two ways.
Thanks