These are all ways to append a div to the body of the HTML. But what are the differences and when should I use which (performance-wise).
var div = '<div id="divid"></div>';
$('body').append(div);
and
var div = $('<div id="divid"></div>');
$('body').append(div);
and
$div = $('<div id="divid"></div>');
$('body').append($div);