Edit in JSFiddle

var name = "Joe";

document.getElementById("output").innerHTML = name.toSource();
<div id="output"></div>