convert jquery to string

JavaScript
var $elem = $('<a href="#">Some element</a>');
console.log("HTML is: " + $elem.get(0).outerHTML);
Source

Also in JavaScript: